SDL_WINDOW_FULLSCREEN_DESKTOP on widescreen



  • Hi,
    I have a question about how to use SDL_CreateWindow with SDL_WINDOW_FULLSCREEN_DESKTOP flag set.
    My game has a resulution of 800x600 and i want to stretch it over the whole screen (Android / Linux).
    I think i did something wrong. What I did is the following:

    mWindow = SDL_CreateWindow("",
    SDL_WINDOWPOS_UNDEFINED,
    SDL_WINDOWPOS_UNDEFINED,
    0, 0,
    SDL_WINDOW_FULLSCREEN_DESKTOP);

    mRenderer = SDL_CreateRenderer(mWindow, -1, 0);

    SDL_SetHint(SDL_HINT_RENDER_SCALE_QUALITY, "linear");
    SDL_RenderSetLogicalSize(mRenderer, 800, 600);

    This results in a unstretched result under linux (black borders) and android (blink borders). I have a FULL-HD 16:9 Display.

    Have I missunderstand the SDL API or is it a bug?

    Best regards,
    Artem


Anmelden zum Antworten