mirror of
https://github.com/libretro/RetroArch
synced 2025-02-21 09:39:56 +00:00
Add allow_rotate.
This commit is contained in:
parent
525d9b3cf5
commit
38a4141eef
@ -212,6 +212,10 @@ static const float refresh_rate = 59.92;
|
|||||||
static const float refresh_rate = 59.95;
|
static const float refresh_rate = 59.95;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
// Allow games to set rotation. If false, rotation requests are honored, but ignored.
|
||||||
|
// Used for setups where one manually rotates the monitor.
|
||||||
|
static const bool allow_rotate = true;
|
||||||
|
|
||||||
////////////////
|
////////////////
|
||||||
// Audio
|
// Audio
|
||||||
////////////////
|
////////////////
|
||||||
|
@ -421,6 +421,9 @@ static bool environment_cb(unsigned cmd, void *data)
|
|||||||
{
|
{
|
||||||
unsigned rotation = *(const unsigned*)data;
|
unsigned rotation = *(const unsigned*)data;
|
||||||
SSNES_LOG("Environ SET_ROTATION: %u\n", rotation);
|
SSNES_LOG("Environ SET_ROTATION: %u\n", rotation);
|
||||||
|
if (!g_settings.video.allow_rotate)
|
||||||
|
break;
|
||||||
|
|
||||||
if (driver.video && driver.video_data && driver.video->set_rotation)
|
if (driver.video && driver.video_data && driver.video->set_rotation)
|
||||||
video_set_rotation_func(rotation);
|
video_set_rotation_func(rotation);
|
||||||
else
|
else
|
||||||
|
@ -126,6 +126,7 @@ struct settings
|
|||||||
bool h264_record;
|
bool h264_record;
|
||||||
bool post_filter_record;
|
bool post_filter_record;
|
||||||
|
|
||||||
|
bool allow_rotate;
|
||||||
char external_driver[PATH_MAX];
|
char external_driver[PATH_MAX];
|
||||||
} video;
|
} video;
|
||||||
|
|
||||||
|
@ -164,6 +164,7 @@ void config_set_defaults(void)
|
|||||||
g_settings.video.crop_overscan = crop_overscan;
|
g_settings.video.crop_overscan = crop_overscan;
|
||||||
g_settings.video.aspect_ratio = -1.0f; // Automatic
|
g_settings.video.aspect_ratio = -1.0f; // Automatic
|
||||||
g_settings.video.shader_type = SSNES_SHADER_AUTO;
|
g_settings.video.shader_type = SSNES_SHADER_AUTO;
|
||||||
|
g_settings.video.allow_rotate = allow_rotate;
|
||||||
|
|
||||||
#ifdef HAVE_FREETYPE
|
#ifdef HAVE_FREETYPE
|
||||||
g_settings.video.font_enable = font_enable;
|
g_settings.video.font_enable = font_enable;
|
||||||
@ -371,6 +372,7 @@ bool config_load_file(const char *path)
|
|||||||
CONFIG_GET_FLOAT(video.fbo_scale_x, "video_fbo_scale_x");
|
CONFIG_GET_FLOAT(video.fbo_scale_x, "video_fbo_scale_x");
|
||||||
CONFIG_GET_FLOAT(video.fbo_scale_y, "video_fbo_scale_y");
|
CONFIG_GET_FLOAT(video.fbo_scale_y, "video_fbo_scale_y");
|
||||||
CONFIG_GET_BOOL(video.second_pass_smooth, "video_second_pass_smooth");
|
CONFIG_GET_BOOL(video.second_pass_smooth, "video_second_pass_smooth");
|
||||||
|
CONFIG_GET_BOOL(video.allow_rotate, "video_allow_rotate");
|
||||||
|
|
||||||
#ifdef HAVE_FREETYPE
|
#ifdef HAVE_FREETYPE
|
||||||
CONFIG_GET_STRING(video.font_path, "video_font_path");
|
CONFIG_GET_STRING(video.font_path, "video_font_path");
|
||||||
|
@ -117,6 +117,11 @@
|
|||||||
# Used to calculate a suitable audio input rate.
|
# Used to calculate a suitable audio input rate.
|
||||||
# video_refresh_rate = 59.95
|
# video_refresh_rate = 59.95
|
||||||
|
|
||||||
|
# Allows libsnes cores to set rotation modes.
|
||||||
|
# Setting this to false will honor, but ignore this request.
|
||||||
|
# This is useful for vertically oriented games where one manually rotates the monitor.
|
||||||
|
# video_allow_rotate = true
|
||||||
|
|
||||||
#### Audio
|
#### Audio
|
||||||
|
|
||||||
# Enable audio.
|
# Enable audio.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user