Fixed LCD layout switching

This commit is contained in:
thesource 2020-09-27 11:10:14 +03:00
parent 8aaabb9b05
commit 905de91c96
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