From 1ce5d0cae3ddc4fa71d925a523ab8871049f1d6f Mon Sep 17 00:00:00 2001 From: Dimitris Panokostas Date: Sat, 21 Jan 2017 15:22:14 +0100 Subject: [PATCH] Changed RGB format to 16-bit --- .gitignore | 1 + src/main.cpp | 2 +- src/osdep/gui/main_window.cpp | 2 +- src/osdep/pandora_gfx.cpp | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/.gitignore b/.gitignore index ef5c1b0c..60f67424 100644 --- a/.gitignore +++ b/.gitignore @@ -24,3 +24,4 @@ Amiberry/VisualGDB/Debug/Amiberry Amiberry/VisualGDB/Release/Amiberry *.ipch *.TMP +VisualGDB/VisualGDB/Release/Amiberry diff --git a/src/main.cpp b/src/main.cpp index a8c69959..09803b30 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -658,7 +658,7 @@ static int real_main2 (int argc, TCHAR **argv) SDL_RenderSetLogicalSize(renderer, 800, 480); texture = SDL_CreateTexture(renderer, - SDL_PIXELFORMAT_ARGB8888, + SDL_PIXELFORMAT_RGB565, SDL_TEXTUREACCESS_STREAMING, 800, 480); diff --git a/src/osdep/gui/main_window.cpp b/src/osdep/gui/main_window.cpp index aae57df4..4f5491a2 100644 --- a/src/osdep/gui/main_window.cpp +++ b/src/osdep/gui/main_window.cpp @@ -170,7 +170,7 @@ namespace sdl //------------------------------------------------- // Create new screen for GUI //------------------------------------------------- - gui_screen = SDL_CreateRGBSurface(0, GUI_WIDTH, GUI_HEIGHT, 32, 0, 0, 0, 0); + gui_screen = SDL_CreateRGBSurface(0, GUI_WIDTH, GUI_HEIGHT, 16, 0, 0, 0, 0); check_error_sdl(gui_screen == nullptr, "Unable to create a surface"); SDL_ShowCursor(SDL_ENABLE); diff --git a/src/osdep/pandora_gfx.cpp b/src/osdep/pandora_gfx.cpp index 412bfb1b..f8c95032 100644 --- a/src/osdep/pandora_gfx.cpp +++ b/src/osdep/pandora_gfx.cpp @@ -215,7 +215,7 @@ static void open_screen(struct uae_prefs *p) if(prSDLScreen == NULL || prSDLScreen->w != p->gfx_size.width || prSDLScreen->h != p->gfx_size.height) { // prSDLScreen = SDL_SetVideoMode(p->gfx_size.width, p->gfx_size.height, 16, SDL_HWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF); - prSDLScreen = SDL_CreateRGBSurface(0, p->gfx_size.width, p->gfx_size.height, 32, 0, 0, 0, 0); + prSDLScreen = SDL_CreateRGBSurface(0, p->gfx_size.width, p->gfx_size.height, 16, 0, 0, 0, 0); check_error_sdl(prSDLScreen == nullptr, "Unable to create a surface"); // make the scaled rendering look smoother. @@ -239,7 +239,7 @@ static void open_screen(struct uae_prefs *p) // prSDLScreen = SDL_SetVideoMode(picasso_vidinfo.width, picasso_vidinfo.height, 16, SDL_HWSURFACE|SDL_FULLSCREEN|SDL_DOUBLEBUF); if (prSDLScreen == NULL || prSDLScreen->w != picasso_vidinfo.width || prSDLScreen->h != picasso_vidinfo.height) { - prSDLScreen = SDL_CreateRGBSurface(0, picasso_vidinfo.width, picasso_vidinfo.height, 32, 0, 0, 0, 0); + prSDLScreen = SDL_CreateRGBSurface(0, picasso_vidinfo.width, picasso_vidinfo.height, 16, 0, 0, 0, 0); check_error_sdl(prSDLScreen == nullptr, "Unable to create a surface"); // make the scaled rendering look smoother.