X-Git-Url: https://notaz.gp2x.de/cgi-bin/gitweb.cgi?p=pcsx_rearmed.git;a=blobdiff_plain;f=frontend%2Flibretro.c;h=aea17e81501041111eb667ea4082bd3b37536b88;hp=94d649e01439fb950f127bd2499a95e1ce36e4e8;hb=11813b9d99d4cf506cf94a9d0db6dd7d6c934117;hpb=a9579f3bc3d60571252172b17195bca246d1a1be diff --git a/frontend/libretro.c b/frontend/libretro.c index 94d649e0..aea17e81 100644 --- a/frontend/libretro.c +++ b/frontend/libretro.c @@ -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" }; @@ -989,7 +995,11 @@ void retro_init(void) exit(1); } +#if defined(_POSIX_C_SOURCE) && (_POSIX_C_SOURCE >= 200112L) posix_memalign(&vout_buf, 16, VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2); +#else + vout_buf = malloc(VOUT_MAX_WIDTH * VOUT_MAX_HEIGHT * 2); +#endif if (environ_cb(RETRO_ENVIRONMENT_GET_SYSTEM_DIRECTORY, &dir) && dir) { @@ -1045,6 +1055,7 @@ void retro_init(void) SaveFuncs.close = save_close; update_variables(false); + check_system_specs(); } void retro_deinit(void)