{
if (strcmp(var.value, "game") == 0)
pl_rearmed_cbs.screen_centering_type = 1;
- else if (strcmp(var.value, "manual") == 0)
+ else if (strcmp(var.value, "borderless") == 0)
pl_rearmed_cbs.screen_centering_type = 2;
+ else if (strcmp(var.value, "manual") == 0)
+ pl_rearmed_cbs.screen_centering_type = 3;
else // auto
pl_rearmed_cbs.screen_centering_type = 0;
}
"pcsx_rearmed_screen_centering",
"(GPU) Screen centering",
NULL,
- "The PSX has a feature allowing it to shift the image position on screen. Some (mostly PAL) games used this feature in a strange way making the image miscentered and causing borders to appear. With 'Auto' the emulator tries to correct this miscentering automatically. 'Game-controlled' uses the settings supplied by the game. 'Manual' allows to override those values with the settings below.",
+ "The PSX has a feature allowing it to shift the image position on screen. Some (mostly PAL) games used this feature in a strange way making the image miscentered and causing uneven borders to appear. With 'Auto' the emulator tries to correct this miscentering automatically. 'Game-controlled' uses the settings supplied by the game. 'Manual' allows to override those values with the settings below.",
NULL,
"video",
{
{ "auto", "Auto" },
{ "game", "Game-controlled" },
+ { "borderless", "Borderless" },
{ "manual", "Manual" },
{ NULL, NULL },
},
#endif
NULL };
static const char *men_dummy[] = { NULL };
-static const char *men_centering[] = { "Auto", "Ingame", "Force", NULL };
+static const char *men_centering[] = { "Auto", "Ingame", "Borderless", "Force", NULL };
static const char h_scaler[] = "int. 2x - scales w. or h. 2x if it fits on screen\n"
"int. 4:3 - uses integer if possible, else fractional";
static const char h_cscaler[] = "Displays the scaler layer, you can resize it\n"
} gpu_peopsgl;
// misc
int gpu_caps;
- int screen_centering_type; // 0 - auto, 1 - game conrolled, 2 - manual
+ int screen_centering_type;
int screen_centering_x;
int screen_centering_y;
};
extern struct rearmed_cbs pl_rearmed_cbs;
+enum centering_type { C_AUTO = 0, C_INGAME, C_BORDERLESS, C_MANUAL };
+
enum gpu_plugin_caps {
GPU_CAP_OWNS_DISPLAY = (1 << 0),
GPU_CAP_SUPPORTS_2X = (1 << 1),
#include <string.h>
#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
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:
/* 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:
*base_hres >>= 1;
}
-#include "../../frontend/plugin_lib.h"
-
void GPUrearmedCallbacks(const struct rearmed_cbs *cbs)
{
gpu.frameskip.set = cbs->frameskip;
{
int w = gpu.screen.hres;
int h = gpu.screen.vres;
- int w_out = w;
- int h_out = h;
+ int w_out, h_out;
+ if (gpu.state.screen_centering_type == C_BORDERLESS)
+ h = gpu.screen.h;
+ w_out = w, h_out = h;
#ifdef RAW_FB_DISPLAY
w = w_out = 1024, h = h_out = 512;
#endif