Changeset 91c89f7 in opengl-game


Ignore:
Timestamp:
Sep 25, 2019, 12:20:59 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
054d9ed
Parents:
502bd0b
Message:

Use SDL_WINDOW_FULLSCREEN_DESKTOP when creating the SDL window to enable going fullscreen in Windows without crashing when SDL_DestroyWindow is called

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    r502bd0b r91c89f7  
    5656   }
    5757
    58    uint32_t flags = SDL_WINDOW_VULKAN | (fullscreen ? SDL_WINDOW_FULLSCREEN : SDL_WINDOW_RESIZABLE);
     58   uint32_t flags = SDL_WINDOW_VULKAN | SDL_WINDOW_SHOWN | (fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : SDL_WINDOW_RESIZABLE);
    5959
    6060   window = SDL_CreateWindow(title.c_str(),
  • vulkan-ref.cpp

    r502bd0b r91c89f7  
    236236         cout << "GUI init succeeded" << endl;
    237237
    238          window = (SDL_Window*) gui->createWindow("Vulkan Game", SCREEN_WIDTH, SCREEN_HEIGHT, false);
     238         window = (SDL_Window*) gui->createWindow("Vulkan Game", SCREEN_WIDTH, SCREEN_HEIGHT, true);
    239239         if (window == nullptr) {
    240240            cout << "Window could not be created!" << endl;
     
    16841684               }
    16851685               if (e.type == SDL_KEYDOWN) {
    1686                   quit = true;
     1686                  if (e.key.keysym.scancode == SDL_SCANCODE_ESCAPE) {
     1687                     quit = true;
     1688                  }
    16871689               }
    16881690               if (e.type == SDL_MOUSEBUTTONDOWN) {
Note: See TracChangeset for help on using the changeset viewer.