From d7ec1068752e3d4db28220e464abba9dbceee2ce Mon Sep 17 00:00:00 2001 From: Duilio Protti Date: Sun, 3 Jul 2016 11:16:28 -0300 Subject: [PATCH] Full-screen key changed from Tab to F11. Screenshot removed --- README.md | 4 ++-- minidocs/controlkeys.md | 38 +++++++++++++++++++------------------- src/display.c | 13 ------------- src/display.h | 1 - src/infinity.c | 7 +++---- 5 files changed, 24 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index 4e2e4fc..492730d 100644 --- a/README.md +++ b/README.md @@ -41,7 +41,7 @@ Run Audacious -> View -> Visualizations -> Infinity -Enter / leave full-screen by pressing `Tab`. +Enter / leave full-screen by pressing `F11`. ![Screenshot of Infinity Settings](https://cloud.githubusercontent.com/assets/2084073/16421084/2d45d54a-3d2a-11e6-9919-3d6aa5733743.png "Infinity Settings") @@ -80,4 +80,4 @@ Releases older than 0.8.0beta1 can be found at Sourceforge: > {your_prefix}/share/infinity/infinite_states +``` diff --git a/src/display.c b/src/display.c index 77fa0bf..1d0b4d2 100644 --- a/src/display.c +++ b/src/display.c @@ -466,24 +466,11 @@ void display_toggle_fullscreen(void) SDL_ShowCursor(is_fullscreen); } -void display_save_screen(void) -{ - gchar name[256]; - - (void)snprintf(name, 255, "screenshot%i%s", rand() % 1000000, ".bmp"); - name[255] = '\0'; - if (SDL_SaveBMP(screen, name) < 0) - g_warning("Error while saving file %s: %s", name, SDL_GetError()); - else - g_message("saved"); -} - inline void display_save_effect(t_effect *effect) { effects_append_effect(effect); } - inline void display_load_random_effect(t_effect *effect) { effects_load_random_effect(effect); diff --git a/src/display.h b/src/display.h index 298f849..773f765 100644 --- a/src/display.h +++ b/src/display.h @@ -83,7 +83,6 @@ void curve(t_effect *current_effect); */ void display_toggle_fullscreen(void); -void display_save_screen(void); void display_save_effect(t_effect *effect); void display_load_random_effect(t_effect *effect); diff --git a/src/infinity.c b/src/infinity.c index 0024a90..08c015a 100644 --- a/src/infinity.c +++ b/src/infinity.c @@ -202,7 +202,7 @@ static void handle_window_event(SDL_Event *event) { G_UNLOCK(resizing); width = event->window.data1; height = event->window.data2; - g_message("Infinity: Screen resized to %dx%d pixels^2", width, height); + g_message("Infinity: screen resize to %dx%d pixels", width, height); must_resize = TRUE; break; /*case SDL_WINDOWEVENT_SIZE_CHANGED: @@ -241,6 +241,7 @@ static void check_events() case SDL_WINDOWEVENT: handle_window_event(&event); break; case SDL_KEYDOWN: + // TODO check how this may work in a Mac keyboard switch (event.key.keysym.sym) { case SDLK_RIGHT: if (player->is_playing()) @@ -254,8 +255,6 @@ static void check_events() player->adjust_volume(5); break; case SDLK_DOWN: player->adjust_volume(-5); break; - case SDLK_TAB: - display_toggle_fullscreen(); break; case SDLK_z: player->previous(); break; case SDLK_x: @@ -267,7 +266,7 @@ static void check_events() case SDLK_b: player->next(); break; case SDLK_F11: - display_save_screen(); break; + display_toggle_fullscreen(); break; case SDLK_F12: if (t_last_color > 32) { t_last_color = 0;