Pause the debugger on SIGINT in the SDL port
This commit is contained in:
parent
1c2af7fa5b
commit
eb3e0eaa1e
11
SDL/main.c
11
SDL/main.c
@ -126,12 +126,18 @@ static uint32_t rgb_encode(GB_gameboy_t *gb, unsigned char r, unsigned char g, u
|
|||||||
return SDL_MapRGB(screen->format, r, g, b);
|
return SDL_MapRGB(screen->format, r, g, b);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
GB_gameboy_t gb;
|
||||||
|
|
||||||
|
static void debugger_interrupt(int ignore)
|
||||||
|
{
|
||||||
|
gb.debug_stopped = true;
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
extern void cocoa_disable_filtering(void);
|
extern void cocoa_disable_filtering(void);
|
||||||
#endif
|
#endif
|
||||||
int main(int argc, char **argv)
|
int main(int argc, char **argv)
|
||||||
{
|
{
|
||||||
GB_gameboy_t gb;
|
|
||||||
bool dmg = false;
|
bool dmg = false;
|
||||||
|
|
||||||
#define str(x) #x
|
#define str(x) #x
|
||||||
@ -174,6 +180,9 @@ usage:
|
|||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
signal(SIGINT, debugger_interrupt);
|
||||||
|
|
||||||
SDL_Init( SDL_INIT_EVERYTHING );
|
SDL_Init( SDL_INIT_EVERYTHING );
|
||||||
screen = SDL_SetVideoMode(160, 144, 32, SDL_SWSURFACE );
|
screen = SDL_SetVideoMode(160, 144, 32, SDL_SWSURFACE );
|
||||||
#ifdef __APPLE__
|
#ifdef __APPLE__
|
||||||
|
Loading…
Reference in New Issue
Block a user