static unsigned previous_height = 0;
static int plugins_opened;
-static int is_pal_mode;
+
+#define is_pal_mode Config.PsxType
/* memory card data */
extern char Mcd1Data[MCD_SIZE];
static void addCrosshair(int port, int crosshair_color, unsigned short *buffer, int bufferStride, int pos_x, int pos_y, int thickness, int size_x, int size_y) {
for (port = 0; port < 2; port++) {
// Draw the horizontal line of the crosshair
- for (int i = pos_y - thickness / 2; i <= pos_y + thickness / 2; i++) {
- for (int j = pos_x - size_x / 2; j <= pos_x + size_x / 2; j++) {
+ int i, j;
+ for (i = pos_y - thickness / 2; i <= pos_y + thickness / 2; i++) {
+ for (j = pos_x - size_x / 2; j <= pos_x + size_x / 2; j++) {
if ((i + vout_height) >= 0 && (i + vout_height) < bufferStride && j >= 0 && j < bufferStride && in_enable_crosshair[port] > 0)
buffer[i * bufferStride + j] = crosshair_color;
- }
}
+ }
// Draw the vertical line of the crosshair
- for (int i = pos_x - thickness / 2; i <= pos_x + thickness / 2; i++) {
- for (int j = pos_y - size_y / 2; j <= pos_y + size_y / 2; j++) {
+ for (i = pos_x - thickness / 2; i <= pos_x + thickness / 2; i++) {
+ for (j = pos_y - size_y / 2; j <= pos_y + size_y / 2; j++) {
if (i >= 0 && i < bufferStride && (j + vout_height) >= 0 && (j + vout_height) < bufferStride && in_enable_crosshair[port] > 0)
buffer[j * bufferStride + i] = crosshair_color;
}
for (port = 0; port < 2; port++) {
if (in_enable_crosshair[port] > 0 && (in_type[port] == PSE_PAD_TYPE_GUNCON || in_type[port] == PSE_PAD_TYPE_GUN))
{
- struct CrosshairInfo crosshairInfo;
- CrosshairDimensions(port, &crosshairInfo);
+ struct CrosshairInfo crosshairInfo;
+ CrosshairDimensions(port, &crosshairInfo);
addCrosshair(port, in_enable_crosshair[port], dest, dstride, crosshairInfo.pos_x, crosshairInfo.pos_y, crosshairInfo.thickness, crosshairInfo.size_x, crosshairInfo.size_y);
}
}
void pl_timing_prepare(int is_pal)
{
- is_pal_mode = is_pal;
}
void plat_trigger_vibrate(int pad, int low, int high)
"pcsx_rearmed_negcon_deadzone",
"pcsx_rearmed_negcon_response",
"pcsx_rearmed_input_sensitivity",
- "pcsx_rearmed_crosshair1",
- "pcsx_rearmed_crosshair2",
+ "pcsx_rearmed_crosshair1",
+ "pcsx_rearmed_crosshair2",
"pcsx_rearmed_konamigunadjustx",
"pcsx_rearmed_konamigunadjusty",
"pcsx_rearmed_gunconadjustx",
unsigned geom_width = vout_width;
memset(info, 0, sizeof(*info));
- info->timing.fps = is_pal_mode ? 50.0 : 60.0;
+ info->timing.fps = psxGetFps();
info->timing.sample_rate = 44100.0;
info->geometry.base_width = geom_width;
info->geometry.base_height = geom_height;
if (check_unsatisfied_libcrypt())
show_notification("LibCrypt protected game with missing SBI detected", 3000, 3);
+ if (Config.TurboCD)
+ show_notification("TurboCD is ON", 700, 2);
return true;
}
int gpu_peops_fix = GPU_PEOPS_OLD_FRAME_SKIP;
#endif
frameskip_type_t prev_frameskip_type;
+ double old_fps = psxGetFps();
var.value = NULL;
var.key = "pcsx_rearmed_frameskip_type";
display_internal_fps = true;
}
+ var.value = NULL;
+ var.key = "pcsx_rearmed_cd_turbo";
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+ {
+ if (strcmp(var.value, "enabled") == 0)
+ Config.TurboCD = true;
+ else
+ Config.TurboCD = false;
+ }
+
#ifdef HAVE_CDROM
var.value = NULL;
var.key = "pcsx_rearmed_phys_cd_readahead";
Config.GpuListWalking = -1;
}
+ var.value = NULL;
+ var.key = "pcsx_rearmed_fractional_framerate";
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+ {
+ if (strcmp(var.value, "disabled") == 0)
+ Config.FractionalFramerate = 0;
+ else if (strcmp(var.value, "enabled") == 0)
+ Config.FractionalFramerate = 1;
+ else // auto
+ Config.FractionalFramerate = -1;
+ }
+
var.value = NULL;
var.key = "pcsx_rearmed_screen_centering";
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
pl_rearmed_cbs.screen_centering_y = atoi(var.value);
}
+ var.value = NULL;
+ var.key = "pcsx_rearmed_show_overscan";
+ if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
+ {
+ if (strcmp(var.value, "auto") == 0)
+ pl_rearmed_cbs.show_overscan = 1;
+ else if (strcmp(var.value, "hack") == 0)
+ pl_rearmed_cbs.show_overscan = 2;
+ else
+ pl_rearmed_cbs.show_overscan = 0;
+ }
+
#ifdef THREAD_RENDERING
var.key = "pcsx_rearmed_gpu_thread_rendering";
var.value = NULL;
}
update_option_visibility();
+
+ if (old_fps != psxGetFps())
+ {
+ struct retro_system_av_info info;
+ retro_get_system_av_info(&info);
+ environ_cb(RETRO_ENVIRONMENT_SET_SYSTEM_AV_INFO, &info);
+ }
}
// Taken from beetle-psx-libretro