mirror of
https://github.com/Oibaf66/frodo-wii.git
synced 2025-02-16 20:39:15 +01:00
Bail out on NULL
This commit is contained in:
parent
fce0db49b7
commit
21bca49baa
4
Makefile
4
Makefile
@ -27,9 +27,9 @@ INCLUDES :=
|
||||
|
||||
PCFLAGS = -DPRECISE_CPU_CYCLES=1 -DPRECISE_CIA_CYCLES=1 -DPC_IS_POINTER=0
|
||||
CFLAGS = -O2 -g -Wall $(MACHDEP) $(INCLUDE) -I$(DEVKITPRO)/SDL/include -U__unix -DHAVE_SDL
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
CXXFLAGS = $(CFLAGS)
|
||||
|
||||
LDFLAGS = -L$(DEVKITPRO)/SDL/lib -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
LDFLAGS = -L$(DEVKITPRO)/SDL/lib -g $(MACHDEP) -Wl,-Map,$(notdir $@).map
|
||||
|
||||
#---------------------------------------------------------------------------------
|
||||
# any extra libraries we wish to link with the project
|
||||
|
@ -83,8 +83,19 @@ int init_graphics(void)
|
||||
|
||||
screen = SDL_CreateRGBSurface(SDL_SWSURFACE, DISPLAY_X, DISPLAY_Y + 17, 8,
|
||||
rmask, gmask, bmask, amask);
|
||||
if (!screen)
|
||||
{
|
||||
fprintf(stderr, "Cannot allocate surface to draw on: %s\n",
|
||||
SDL_GetError);
|
||||
exit(1);
|
||||
}
|
||||
real_screen = SDL_SetVideoMode(FULL_DISPLAY_X, FULL_DISPLAY_Y, 8,
|
||||
SDL_DOUBLEBUF);
|
||||
if (!real_screen)
|
||||
{
|
||||
fprintf(stderr, "\n\nCannot initialize video: %s\n", SDL_GetError());
|
||||
exit(1);
|
||||
}
|
||||
|
||||
return 1;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user