Skip to content

Commit

Permalink
Fixed LCD layout switching
Browse files Browse the repository at this point in the history
  • Loading branch information
thesourcehim committed Sep 27, 2020
1 parent 8aaabb9 commit 905de91
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion desmume/src/frontend/posix/gtk/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 905de91

Please sign in to comment.