in previous versions of SDL, I managed to get the height and width of my problem using the main surface on which the clip_rect element was. Starting with version 2.0, I use SDL_Renderer and SDL_Window.
How to get window size or even better than direct my current program?
To get the height and width of the window:
void SDL_GetWindowSize(SDL_Window* window,int* w,int* h)
Here you can see more functions for any tasks related to windows. https://wiki.libsdl.org/CategoryVideo
If you are just looking for width and height and everything else that you usually find in SDL_Surface, this works just as well, if not better:
SDL_Surface
:
SDL_GetWindowSurface(m_window)->w;
SDL_GetWindowSurface(m_window)->h;
Source: https://habr.com/ru/post/1537080/More articles:IIS FastCGI request parameters from PHP - phpКак разобрать огромный файл по строкам, сериализовать и десериализовать огромный объект эффективно? - javaIn Javascript, why setting a prototype in a constructor function changes the value of .constructor to its instance? - javascriptAdding base_url () to the header - phpGnuplot, how to reduce the number of ticks on the x axis - gnuplotF # passing an array to an attribute - f #Запишите некоторые данные в базу данных в Codeigniter - sqlColon in real estate storage - javaCan WCF Restful service allow the same method as WebGet and WebInvoke? - c #android: screenOrientation = "sensorPortrait" does not work on API +17 - androidAll Articles