OSDN Git Service

sdl2: overhaul window size handling
authorGerd Hoffmann <kraxel@redhat.com>
Tue, 11 Nov 2014 12:12:02 +0000 (13:12 +0100)
committerGerd Hoffmann <kraxel@redhat.com>
Wed, 17 Dec 2014 11:44:01 +0000 (12:44 +0100)
commit46522a82236ea0cf9011b89896d2d8f8ddaf2443
tree3534dd753682dcb6db8243b6303fa79c89286ef0
parentf1ddebd8651c023409d3505f83416f65ce088961
sdl2: overhaul window size handling

Split do_sdl_resize function (which does alot more than just resizing)
into three: sdl2_window_{create,destroy,resize}.

Fix SDL_Renderer handling: must be guest display size not host window
size, and SDL2 will magically handle all scaling for us.

Make fullscreen actually enter fullscreen mode and simplify the code.
There is no need to store the original window size, the window manager
will do that for us.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
ui/sdl2.c