Changeset a6f6833 in opengl-game for game-gui-sdl.cpp


Ignore:
Timestamp:
Sep 15, 2019, 5:27:13 AM (5 years ago)
Author:
Dmitry Portnoy <dmp1488@…>
Branches:
feature/imgui-sdl, master, points-test
Children:
92cbc6a
Parents:
09e15a4
Message:

Remove getWindowSize() from game-gui and instead add getWindowWidth(), getWindowHeight(), and refreshWindowSize() (which updates the internal variables returned by the first two functions)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • game-gui-sdl.cpp

    r09e15a4 ra6f6833  
    6161               SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED,
    6262               width, height, flags);
     63
     64   refreshWindowSize();
    6365
    6466   return window;
     
    125127}
    126128
     129void GameGui_SDL::refreshWindowSize() {
     130   SDL_GetWindowSize(window, &windowWidth, &windowHeight);
     131}
     132
     133int GameGui_SDL::getWindowWidth() {
     134   return windowWidth;
     135}
     136
     137int GameGui_SDL::getWindowHeight() {
     138   return windowHeight;
     139}
     140
    127141#ifdef GAMEGUI_INCLUDE_VULKAN
    128142
     
    131145      RTWO_SUCCESS : RTWO_ERROR;
    132146}
    133 
    134 #endif
    135147
    136148vector<const char*> GameGui_SDL::getRequiredExtensions() {
     
    144156}
    145157
    146 void GameGui_SDL::getWindowSize(int* width, int* height) {
    147    SDL_GetWindowSize(window, width, height);
    148 }
     158#endif
Note: See TracChangeset for help on using the changeset viewer.