X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Flibretro.c;h=09e833bad1de3672d1aea7820420cf454cd65ab7;hp=51c0a6e5da129b5ccb4e0975eb57c095f37f7f06;hb=32ab9e53f99b5b37b1262807393382baed8d8bba;hpb=291224374dd130c5cbee87ccce40a1cd0d9eb968 diff --git a/frontend/libretro.c b/frontend/libretro.c index 51c0a6e5..09e833ba 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -870,17 +870,17 @@ static void update_variables(bool in_flight) } #endif - if (in_flight) { - // inform core things about possible config changes - plugin_call_rearmed_cbs(); + if (in_flight) { + // inform core things about possible config changes + plugin_call_rearmed_cbs(); - if (GPU_open != NULL && GPU_close != NULL) { - GPU_close(); - GPU_open(&gpuDisp, "PCSX", NULL); - } + if (GPU_open != NULL && GPU_close != NULL) { + GPU_close(); + GPU_open(&gpuDisp, "PCSX", NULL); + } - dfinput_activate(); - } + dfinput_activate(); + } } void retro_run(void) @@ -902,13 +902,13 @@ void retro_run(void) if (input_state_cb(0, RETRO_DEVICE_JOYPAD, 0, i)) in_keystate |= retro_psx_map[i]; - if (in_type1 == PSE_PAD_TYPE_ANALOGPAD) - { - in_a1[0] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128; - in_a1[1] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128; - in_a2[0] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128; - in_a2[1] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128; - } + if (in_type1 == PSE_PAD_TYPE_ANALOGPAD) + { + in_a1[0] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128; + in_a1[1] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_LEFT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128; + in_a2[0] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_X) / 256) + 128; + in_a2[1] = (input_state_cb(0, RETRO_DEVICE_ANALOG, RETRO_DEVICE_INDEX_ANALOG_RIGHT, RETRO_DEVICE_ID_ANALOG_Y) / 256) + 128; + } stop = 0; psxCpu->Execute(); @@ -974,6 +974,12 @@ static bool find_any_bios(const char *dirpath, char *path, size_t path_size) #define find_any_bios(...) false #endif +static void check_system_specs(void) +{ + unsigned level = 6; + environ_cb(RETRO_ENVIRONMENT_SET_PERFORMANCE_LEVEL, &level); +} + void retro_init(void) { const char *bios[] = { "scph1001", "scph5501", "scph7001" }; @@ -1049,6 +1055,7 @@ void retro_init(void) SaveFuncs.close = save_close; update_variables(false); + check_system_specs(); } void retro_deinit(void)