Merge 184d34c87c
into 8f33b63153
This commit is contained in:
commit
a0d5827f98
|
@ -413,6 +413,8 @@ static InputDescriptors zombie_inputs = {
|
|||
{
|
||||
{ "UP - DOWN", Full, 1, true },
|
||||
{ "LEFT - RIGHT", Full, 0, true },
|
||||
{ "", Half, 4 }, // unused but P2 starts at axis 4
|
||||
{ "", Half, 5 }, // unused but P2 starts at axis 4
|
||||
},
|
||||
};
|
||||
|
||||
|
|
|
@ -117,6 +117,7 @@ static int trigger_deadzone = 0;
|
|||
static bool digital_triggers = false;
|
||||
static bool allow_service_buttons = false;
|
||||
static bool haveCardReader;
|
||||
static bool native_240p = false;
|
||||
|
||||
static bool libretro_supports_bitmasks = false;
|
||||
|
||||
|
@ -674,6 +675,18 @@ static bool set_variable_visibility(void)
|
|||
|
||||
static void setGameGeometry(retro_game_geometry& geometry)
|
||||
{
|
||||
if (native_240p)
|
||||
{
|
||||
geometry.base_width = 640;
|
||||
geometry.base_height = 240;
|
||||
geometry.max_width = 640;
|
||||
geometry.max_height = 240;
|
||||
geometry.aspect_ratio = 4.0f / 3.0f;
|
||||
if (rotate_screen)
|
||||
geometry.aspect_ratio = 3.0f / 4.0f;
|
||||
return;
|
||||
}
|
||||
|
||||
geometry.aspect_ratio = framebufferAspectRatio;
|
||||
if (rotate_screen)
|
||||
geometry.aspect_ratio = 1 / geometry.aspect_ratio;
|
||||
|
@ -684,6 +697,7 @@ static void setGameGeometry(retro_game_geometry& geometry)
|
|||
geometry.base_height = 480;
|
||||
}
|
||||
|
||||
|
||||
void setAVInfo(retro_system_av_info& avinfo)
|
||||
{
|
||||
double sample_rate = 44100.0;
|
||||
|
@ -778,15 +792,24 @@ static void update_variables(bool first_startup)
|
|||
var.key = CORE_OPTION_NAME "_internal_resolution";
|
||||
if (environ_cb(RETRO_ENVIRONMENT_GET_VARIABLE, &var) && var.value)
|
||||
{
|
||||
char str[100];
|
||||
snprintf(str, sizeof(str), "%s", var.value);
|
||||
if (!strcmp(var.value, "640x240"))
|
||||
{
|
||||
config::RenderResolution = 480;
|
||||
native_240p = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
native_240p = false;
|
||||
char str[100];
|
||||
snprintf(str, sizeof(str), "%s", var.value);
|
||||
|
||||
char *pch = strtok(str, "x");
|
||||
pch = strtok(NULL, "x");
|
||||
if (pch != nullptr)
|
||||
config::RenderResolution = strtoul(pch, NULL, 0);
|
||||
|
||||
DEBUG_LOG(COMMON, "Got height: %u", (int)config::RenderResolution);
|
||||
char *pch = strtok(str, "x");
|
||||
pch = strtok(NULL, "x");
|
||||
if (pch != nullptr)
|
||||
config::RenderResolution = strtoul(pch, NULL, 0);
|
||||
|
||||
DEBUG_LOG(COMMON, "Got height: %u", (int)config::RenderResolution);
|
||||
}
|
||||
}
|
||||
|
||||
var.key = CORE_OPTION_NAME "_alpha_sorting";
|
||||
|
|
|
@ -255,6 +255,7 @@ struct retro_core_option_v2_definition option_defs_us[] = {
|
|||
"video",
|
||||
{
|
||||
{ "320x240", "320x240 (Half)" },
|
||||
{ "640x240", "640x240 (Native 240p)" },
|
||||
{ "640x480", "640x480 (Native)" },
|
||||
{ "800x600", "800x600 (x1.25)" },
|
||||
{ "960x720", "960x720 (x1.5)" },
|
||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue