From: notaz Date: Wed, 30 Aug 2023 20:30:39 +0000 (+0300) Subject: make GPUopen consistent everywhere X-Git-Tag: r24l~208 X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=93edff923c38444b01006a373ee66bdf7de52d9a;p=pcsx_rearmed.git make GPUopen consistent everywhere libretro/pcsx_rearmed#752 --- 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 24488e9e..bde209eb 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 bb62d597..cf627344 100644 --- a/plugins/gpulib/gpu.h +++ b/plugins/gpulib/gpu.h @@ -154,7 +154,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 4ba8e31c..f6d80814 100644 --- a/plugins/gpulib/vout_pl.c +++ b/plugins/gpulib/vout_pl.c @@ -126,7 +126,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; }