Skip to content

Commit

Permalink
Rename switch_fullscreen() to toggle_fullscreen()
Browse files Browse the repository at this point in the history
Toggle means to switch between two states.
  • Loading branch information
rom1v committed Sep 25, 2024
1 parent 0bb3955 commit d92b7a6
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app/src/input_manager.c
Original file line number Diff line number Diff line change
Expand Up @@ -536,7 +536,7 @@ sc_input_manager_process_key(struct sc_input_manager *im,
return;
case SDLK_f:
if (video && !shift && !repeat && down) {
sc_screen_switch_fullscreen(im->screen);
sc_screen_toggle_fullscreen(im->screen);
}
return;
case SDLK_w:
Expand Down
4 changes: 2 additions & 2 deletions app/src/screen.c
Original file line number Diff line number Diff line change
Expand Up @@ -538,7 +538,7 @@ sc_screen_show_initial_window(struct sc_screen *screen) {
SDL_SetWindowPosition(screen->window, x, y);

if (screen->req.fullscreen) {
sc_screen_switch_fullscreen(screen);
sc_screen_toggle_fullscreen(screen);
}

if (screen->req.start_fps_counter) {
Expand Down Expand Up @@ -774,7 +774,7 @@ sc_screen_set_paused(struct sc_screen *screen, bool paused) {
}

void
sc_screen_switch_fullscreen(struct sc_screen *screen) {
sc_screen_toggle_fullscreen(struct sc_screen *screen) {
assert(screen->video);

uint32_t new_mode = screen->fullscreen ? 0 : SDL_WINDOW_FULLSCREEN_DESKTOP;
Expand Down
4 changes: 2 additions & 2 deletions app/src/screen.h
Original file line number Diff line number Diff line change
Expand Up @@ -126,9 +126,9 @@ sc_screen_destroy(struct sc_screen *screen);
void
sc_screen_hide_window(struct sc_screen *screen);

// switch the fullscreen mode
// toggle the fullscreen mode
void
sc_screen_switch_fullscreen(struct sc_screen *screen);
sc_screen_toggle_fullscreen(struct sc_screen *screen);

// resize window to optimal size (remove black borders)
void
Expand Down

0 comments on commit d92b7a6

Please sign in to comment.