We are currently migrating Bugzilla to GitHub issues.
Any changes made to the bug tracker now will be lost, so please do not post new bugs or make changes to them.
When we're done, all bug URLs will redirect to their equivalent location on the new bug tracker.

Bug 3271

Summary: SDL_FlllRect paints entire screen instead of specified window surface
Product: SDL Reporter: mydevlists
Component: videoAssignee: Gabriel Jacobo <gabomdq>
Status: RESOLVED ABANDONED QA Contact: Sam Lantinga <slouken>
Severity: major    
Priority: P2 CC: amaranth72
Version: 2.0.4   
Hardware: ARM   
OS: Other   

Description mydevlists 2016-02-24 22:30:01 UTC
-- ARMV7 - RaspberryPi 2
-- SDL2 2.0.4

-- The following code paints the entire screen yellow
-- Commenting out the surface code does not create a window (probably related).

#include <stdio.h>
#include <SDL2/SDL.h>

const int SCREEN_WIDTH = 640;
const int SCREEN_HEIGHT = 480;

int main ( int argc, char** argv )
{
    SDL_Window * window = NULL;
    SDL_Surface * surface = NULL;

    // initialize SDL video
    if ( SDL_Init( SDL_INIT_VIDEO ) < 0 )
    {
        printf( "Unable to init SDL: %s\n", SDL_GetError() );
        return 1;
    }

    // make sure SDL cleans up before exit
    atexit(SDL_Quit);
    window = SDL_CreateWindow("Hi world!",
                              SDL_WINDOWPOS_UNDEFINED,
                              SDL_WINDOWPOS_UNDEFINED,
                              SCREEN_WIDTH,
                              SCREEN_HEIGHT,
                              SDL_WINDOW_RESIZABLE);
    if (window == NULL)
    {
        printf("Window not created: %s\n",SDL_GetError());
    }
    else
    {
        surface = SDL_GetWindowSurface(window);
        SDL_FillRect(surface,NULL,SDL_MapRGBA(surface->format,255,255,0,255));
        SDL_UpdateWindowSurface(window);
        SDL_Delay(5000);
    }

   SDL_DestroyWindow(window);
   SDL_Quit();


    // all is well ;)
    printf("Exited cleanly\n");
    return 0;
}
Comment 1 Alex Szpakowski 2016-02-25 01:43:47 UTC
I don't think the hardware-accelerated Raspberry Pi videocore backend supports non-fullscreen windowing (I could be wrong though).
Comment 2 Ryan C. Gordon 2018-08-06 21:20:20 UTC
Hello, and sorry if you're getting dozens of copies of this message by email.

We are closing out bugs that appear to be abandoned in some form. This can happen for lots of reasons: we couldn't reproduce it, conversation faded out, the bug was noted as fixed in a comment but we forgot to mark it resolved, the report is good but the fix is impractical, we fixed it a long time ago without realizing there was an associated report, etc.

Individually, any of these bugs might have a better resolution (such as WONTFIX or WORKSFORME or INVALID) but we've added a new resolution of ABANDONED to make this easily searchable and make it clear that it's not necessarily unreasonable to revive a given bug report.

So if this bug is still a going concern and you feel it should still be open: please feel free to reopen it! But unless you respond, we'd like to consider these bugs closed, as many of them are several years old and overwhelming our ability to prioritize recent issues.

(please note that hundred of bug reports were sorted through here, so we apologize for any human error. Just reopen the bug in that case!)

Thanks,
--ryan.