Merge pull request #380 from thesourcehim/master

GTK: fixed LCD layout switching
This commit is contained in:
zeromus 2020-09-27 14:23:35 -04:00 committed by GitHub
commit e07e5e5db4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 1 deletions

View File

@ -2137,7 +2137,14 @@ static void SetWinsize(GSimpleAction *action, GVariant *parameter, gpointer user
static void SetOrientation(GSimpleAction *action, GVariant *parameter, gpointer user_data)
{
const char *string = g_variant_get_string(parameter, NULL);
nds_screen.orientation = (orientation_enum)g_ascii_strtoll(string, NULL, 10);
orientation_enum orient=ORIENT_VERTICAL;
if(strcmp(string, "vertical") == 0)
orient = ORIENT_VERTICAL;
else if(strcmp(string, "horizontal") == 0)
orient = ORIENT_HORIZONTAL;
else if(strcmp(string, "single") == 0)
orient = ORIENT_SINGLE;
nds_screen.orientation = orient;
#ifdef HAVE_LIBAGG
osd->singleScreen = nds_screen.orientation == ORIENT_SINGLE;
#endif