Skip to content

Commit

Permalink
switch: address PR comments
Browse files Browse the repository at this point in the history
  • Loading branch information
p-sam committed Oct 10, 2023
1 parent a82d35c commit 03eb969
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/config.c
Original file line number Diff line number Diff line change
Expand Up @@ -499,7 +499,6 @@ void config_load(void) {
#ifdef __SWITCH__
config_set_int(CONFIG_GAMEPAD_ENABLED, true);
config_set_str(CONFIG_GAMEPAD_DEVICE, "any");
config_set_int(CONFIG_FULLSCREEN, 0);
config_set_int(CONFIG_VID_WIDTH, nxGetInitialScreenWidth());
config_set_int(CONFIG_VID_HEIGHT, nxGetInitialScreenHeight());
#endif
Expand Down
3 changes: 3 additions & 0 deletions src/video.c
Original file line number Diff line number Diff line change
Expand Up @@ -142,6 +142,8 @@ static VideoCapabilityState video_query_capability_alwaysfullscreen(VideoCapabil

static VideoCapabilityState video_query_capability_switch(VideoCapability cap) {
switch(cap) {
// We want the window to be resizable and resized internally by SDL
// when the Switch gets docked/undocked
case VIDEO_CAP_FULLSCREEN:
return VIDEO_NEVER_AVAILABLE;

Expand Down Expand Up @@ -777,6 +779,7 @@ static bool video_handle_window_event(SDL_Event *event, void *arg) {
log_debug("SDL_WINDOWEVENT_SIZE_CHANGED: %ix%i", event->window.data1, event->window.data2);

// Catch resizes by the SDL portlib itself, when the console is docked/undocked
// https://github.com/devkitPro/SDL/issues/31
if(video_get_backend() == VIDEO_BACKEND_SWITCH) {
video_handle_resize(event->window.data1, event->window.data2);
}
Expand Down

0 comments on commit 03eb969

Please sign in to comment.