SameBoy | Accurate GB/GBC emulator |
| download: https://git.y1.nz/archives/sameboy.tar.gz | |
| README | Files | Log | Refs | LICENSE |
commit 0e6b9da42d0e6d16620d08dde9660de2537fdf11 parent 1376c386a2c67e4cce935f7a0c2169abe3e0e368 Author: Lior Halphon <LIJI32@gmail.com> Date: Wed, 20 Oct 2021 23:36:48 +0300 Merge branch 'master' of https://github.com/LIJI32/SameBoy Diffstat:
| M | SDL/gui.c | 6 | ++++++ |
1 file changed, 6 insertions(+), 0 deletions(-)
diff --git a/SDL/gui.c b/SDL/gui.c @@ -1160,6 +1160,12 @@ void run_gui(bool is_running) static SDL_Surface *converted_background = NULL; if (!converted_background) { SDL_Surface *background = SDL_LoadBMP(resource_path("background.bmp")); + + /* Create a blank background if background.bmp could not be loaded */ + if (!background) { + background = SDL_CreateRGBSurface(0, 160, 144, 8, 0, 0, 0, 0); + } + SDL_SetPaletteColors(background->format->palette, gui_palette, 0, 4); converted_background = SDL_ConvertSurface(background, pixel_format, 0); SDL_LockSurface(converted_background);
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.