Why can't I use some flags in combination for my SDL window?

48 Views Asked by At

I need my window to contain the SDL_WINDOW_ALLOW_HIGHDPI and SDL_WINDOW_OPENGL flag but when i tried to implement that my window would just ignore the SDL_WINDOW_ALLOW_HIGHDPI flag. To double check I tried using them separate and both worked. Does anybody know why?

I tried doing this:

SDL_Window *window = SDL_CreateWindow("OpenGL", 
                                      SDL_WINDOWPOS_UNDEFINED, 
                                      SDL_WINDOWPOS_UNDEFINED, 
                                      WIDTH, 
                                      HEIGHT, 
                                      SDL_WINDOW_ALLOW_HIGHDPI | SDL_WINDOW_OPENGL);

But when I moved my mouse while printing the mouse position to the console I noticed that my window ignored the SDL_WINDOW_ALLOW_HIGHDPI flag.

0

There are 0 best solutions below