Improving debugger.
This commit is contained in:
8
main.cpp
8
main.cpp
@@ -46,6 +46,8 @@ int main(int argc, char** argv) {
|
||||
|
||||
debug_init(vm_get_memory());
|
||||
|
||||
bool running = false;
|
||||
|
||||
static bool should_quit = false;
|
||||
static SDL_Event sdlEvent;
|
||||
SDL_Scancode just_pressed;
|
||||
@@ -57,14 +59,16 @@ int main(int argc, char** argv) {
|
||||
if (sdlEvent.type == SDL_WINDOWEVENT_CLOSE) { should_quit = true; break; }
|
||||
if (sdlEvent.type == SDL_QUIT) { should_quit = true; break; }
|
||||
else if (sdlEvent.type == SDL_KEYDOWN) {
|
||||
anykey = true;
|
||||
//anykey = true;
|
||||
just_pressed = sdlEvent.key.keysym.scancode;
|
||||
if (sdlEvent.key.keysym.scancode == SDL_SCANCODE_SPACE) { anykey = true; }
|
||||
if (sdlEvent.key.keysym.scancode == SDL_SCANCODE_ESCAPE) { should_quit = true; }
|
||||
if (sdlEvent.key.keysym.scancode == SDL_SCANCODE_F10) { vm_big_step(); debug_update(); }
|
||||
if (sdlEvent.key.keysym.scancode == SDL_SCANCODE_F11) { vm_step(); debug_update(); }
|
||||
if (sdlEvent.key.keysym.scancode == SDL_SCANCODE_F5) { running = !running; if (!running) debug_update(); }
|
||||
}
|
||||
}
|
||||
//vm_step();
|
||||
if (running) vm_step();
|
||||
//if (SDL_GetTicks() - ticks >= 15) { vdp_flip(); ticks = SDL_GetTicks(); }
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user