Skip to content

Commit

Permalink
Window Size Changer
Browse files Browse the repository at this point in the history
  • Loading branch information
darkxex committed Feb 9, 2022
1 parent 4d53444 commit f39800c
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
4 changes: 4 additions & 0 deletions include/gui.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@
#include "shaderMania.h"
#include "themes.h"

#define handheldWidth 1280
#define handheldHeight 720
#define dockedWidth 1920
#define dockedHeight 1080

enum MENU_STATES {
MENU_STATE_HOME,
Expand Down
5 changes: 4 additions & 1 deletion source/gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1000,12 +1000,15 @@ namespace GUI {
if (isHandheld == false)
{isHandheld=true;
printf("changed to Handheld Mode.\n");
SDL_SetWindowSize(window, handheldWidth, handheldHeight);
}
}
if (stus == AppletOperationMode_Console)
{ if (isHandheld == true)
{isHandheld=false;
printf("changed to Docked Mode.\n");}
printf("changed to Docked Mode.\n");
SDL_SetWindowSize(window, dockedWidth, dockedHeight);
}
}
#endif

Expand Down
5 changes: 0 additions & 5 deletions source/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,11 +46,6 @@
using namespace c2d;
#endif

#define handheldWidth 1280
#define handheldHeight 720
#define dockedWidth 1920
#define dockedHeight 1080

static bool init();

SDL_Window *window;
Expand Down

0 comments on commit f39800c

Please sign in to comment.