X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=plugins%2Fgpulib%2Fgpu.c;h=f07677451b2de8f8f97619c949075e01c7c3a024;hb=44e76f8ad4944acfc109baf89beda7b723f8a209;hp=fdb109ce09f1ca8057307a8a8c6fe4c95c03bfef;hpb=db6e56b6bfb5bcdacc86150061861a74365331e0;p=pcsx_rearmed.git diff --git a/plugins/gpulib/gpu.c b/plugins/gpulib/gpu.c index fdb109ce..f0767745 100644 --- a/plugins/gpulib/gpu.c +++ b/plugins/gpulib/gpu.c @@ -13,8 +13,11 @@ #include #include "gpu.h" #include "../../libpcsxcore/gpu.h" // meh +#include "../../frontend/plugin_lib.h" +#ifndef ARRAY_SIZE #define ARRAY_SIZE(x) (sizeof(x) / sizeof((x)[0])) +#endif #ifdef __GNUC__ #define unlikely(x) __builtin_expect((x), 0) #define preload __builtin_prefetch @@ -81,9 +84,9 @@ static noinline void update_width(void) sw /= hdiv; sw = (sw + 2) & ~3; // according to nocash switch (gpu.state.screen_centering_type) { - case 1: + case C_INGAME: break; - case 2: + case C_MANUAL: x = gpu.state.screen_centering_x; break; default: @@ -125,9 +128,12 @@ static noinline void update_height(void) /* nothing displayed? */; else { switch (gpu.state.screen_centering_type) { - case 1: + case C_INGAME: + break; + case C_BORDERLESS: + y = 0; break; - case 2: + case C_MANUAL: y = gpu.state.screen_centering_y; break; default: @@ -903,8 +909,6 @@ void GPUgetScreenInfo(int *y, int *base_hres) *base_hres >>= 1; } -#include "../../frontend/plugin_lib.h" - void GPUrearmedCallbacks(const struct rearmed_cbs *cbs) { gpu.frameskip.set = cbs->frameskip;