From 71e413beb2288211f8864040d325de6e1676c413 Mon Sep 17 00:00:00 2001 From: notaz Date: Wed, 30 Aug 2023 23:30:39 +0300 Subject: [PATCH] make GPUopen consistent everywhere libretro/pcsx_rearmed#752 --- plugins/gpu-gles/gpuPlugin.c | 2 +- plugins/gpu-gles/gpuPlugin.h | 2 +- plugins/gpu-gles/gpulib_if.c | 4 ++-- plugins/gpulib/gpu.h | 2 +- plugins/gpulib/vout_pl.c | 2 +- plugins/gpulib/vout_sdl.c | 4 ++-- 6 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/gpu-gles/gpuPlugin.c b/plugins/gpu-gles/gpuPlugin.c index 6d3ca14c..906d01ee 100644 --- a/plugins/gpu-gles/gpuPlugin.c +++ b/plugins/gpu-gles/gpuPlugin.c @@ -453,7 +453,7 @@ return 0; // some PAD or SPU plugins would not work anymore) //////////////////////////////////////////////////////////////////////// -long CALLBACK GPUopen(int hwndGPU) +long CALLBACK GPUopen(unsigned long *disp, char *cap, char *cfg) { iResX=800;iResY=480; iColDepth=8; diff --git a/plugins/gpu-gles/gpuPlugin.h b/plugins/gpu-gles/gpuPlugin.h index 7a72fbd2..556d7f53 100644 --- a/plugins/gpu-gles/gpuPlugin.h +++ b/plugins/gpu-gles/gpuPlugin.h @@ -65,7 +65,7 @@ typedef struct { #if 0 long CALLBACK GPUinit(); long CALLBACK GPUshutdown(); -long CALLBACK GPUopen(int hwndGPU); +long CALLBACK GPUopen(unsigned long *disp, char *cap, char *cfg); long CALLBACK GPUclose(); unsigned long CALLBACK GPUreadData(void); void CALLBACK GPUreadDataMem(unsigned long * pMem, int iSize); diff --git a/plugins/gpu-gles/gpulib_if.c b/plugins/gpu-gles/gpulib_if.c index b592175b..923f652e 100644 --- a/plugins/gpu-gles/gpulib_if.c +++ b/plugins/gpu-gles/gpulib_if.c @@ -679,7 +679,7 @@ void vout_set_config(const struct rearmed_cbs *cbs) static struct rearmed_cbs *cbs; -long GPUopen(void **dpy) +long GPUopen(unsigned long *disp, char *cap, char *cfg) { int ret; @@ -738,7 +738,7 @@ void renderer_set_config(const struct rearmed_cbs *cbs_) if (is_opened && cbs->gles_display != NULL && cbs->gles_surface != NULL) { // HACK.. GPUclose(); - GPUopen(NULL); + GPUopen(NULL, NULL, NULL); } set_vram(gpu.vram); diff --git a/plugins/gpulib/gpu.h b/plugins/gpulib/gpu.h index b6bd60af..2f7a464c 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -145,7 +145,7 @@ uint32_t GPUreadStatus(void); void GPUwriteStatus(uint32_t data); long GPUfreeze(uint32_t type, struct GPUFreeze *freeze); void GPUupdateLace(void); -long GPUopen(void **dpy); +long GPUopen(unsigned long *disp, char *cap, char *cfg); long GPUclose(void); void GPUvBlank(int is_vblank, int lcf); void GPUrearmedCallbacks(const struct rearmed_cbs *cbs_); diff --git a/plugins/gpulib/vout_pl.c b/plugins/gpulib/vout_pl.c index eadf57ce..cae35a3f 100644 --- a/plugins/gpulib/vout_pl.c +++ b/plugins/gpulib/vout_pl.c @@ -114,7 +114,7 @@ void vout_blank(void) cbs->pl_vout_flip(NULL, 1024, !!(gpu.status & PSX_GPU_STATUS_RGB24), 0, 0, w, h, 0); } -long GPUopen(void **unused) +long GPUopen(unsigned long *disp, char *cap, char *cfg) { gpu.frameskip.active = 0; gpu.frameskip.frame_ready = 1; diff --git a/plugins/gpulib/vout_sdl.c b/plugins/gpulib/vout_sdl.c index 56ab811c..81272b29 100644 --- a/plugins/gpulib/vout_sdl.c +++ b/plugins/gpulib/vout_sdl.c @@ -81,9 +81,9 @@ void vout_blank(void) { } -long GPUopen(void **dpy) +long GPUopen(unsigned long *disp, char *cap, char *cfg) { - *dpy = x11_display; + *disp = (long)x11_display; return 0; } -- 2.39.2