- [NEW] Les accións de execució (stop, cont, step, next) funcionen desde qualsevol finestra
- [FIX] Tancara la finestra de debug no fa que la execució continue - [NEW] El foco va a la finestra que mes convé - [FIX] El breakpoints i el Next mostren la instrucció que toca
This commit is contained in:
46
z80debug.cpp
46
z80debug.cpp
@@ -54,10 +54,8 @@ namespace z80debug
|
||||
z80debug::refresh();
|
||||
zxscreen::redraw();
|
||||
} else if (e->window.event == SDL_WINDOWEVENT_CLOSE) {
|
||||
z80debug::history::gototop();
|
||||
const uint8_t dt = z80::step();
|
||||
z80debug::cont();
|
||||
zxscreen::refresh(dt);
|
||||
hide();
|
||||
zxscreen::focus();
|
||||
}
|
||||
}
|
||||
if (e->type == SDL_MOUSEWHEEL) {
|
||||
@@ -74,20 +72,6 @@ namespace z80debug
|
||||
if (e->type == SDL_KEYDOWN) {
|
||||
if (e->key.keysym.scancode==SDL_SCANCODE_ESCAPE) {
|
||||
return false;
|
||||
} else if (e->key.keysym.scancode==SDL_SCANCODE_F10) {
|
||||
z80debug::history::gototop();
|
||||
const uint8_t dt = z80::step();
|
||||
z80debug::refresh();
|
||||
zxscreen::refresh(dt);
|
||||
zxscreen::redraw();
|
||||
z80analyze::refresh();
|
||||
} else if (e->key.keysym.scancode==SDL_SCANCODE_F11) {
|
||||
z80debug::history::gototop();
|
||||
const uint8_t dt = z80debug::next();
|
||||
z80debug::refresh();
|
||||
zxscreen::refresh(dt);
|
||||
zxscreen::redraw();
|
||||
z80analyze::refresh();
|
||||
} else if (e->key.keysym.scancode==SDL_SCANCODE_F1) {
|
||||
z80debug::history::gototop();
|
||||
z80debug::refresh();
|
||||
@@ -97,11 +81,6 @@ namespace z80debug
|
||||
} else if (e->key.keysym.scancode==SDL_SCANCODE_F3) {
|
||||
z80debug::history::goforward();
|
||||
z80debug::refresh();
|
||||
} else if (e->key.keysym.scancode==SDL_SCANCODE_F5) {
|
||||
z80debug::history::gototop();
|
||||
const uint8_t dt = z80::step();
|
||||
z80debug::cont();
|
||||
zxscreen::refresh(dt);
|
||||
/*} else if (e->key.keysym.scancode==SDL_SCANCODE_F6) {
|
||||
z80debug::history::gototop();
|
||||
const uint8_t dt = z80::step();
|
||||
@@ -137,13 +116,21 @@ namespace z80debug
|
||||
|
||||
void show()
|
||||
{
|
||||
if (win) return;
|
||||
win = SDL_CreateWindow("Z80 Debugger", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 83*CHR_W, 34*CHR_H, SDL_WINDOW_RESIZABLE);
|
||||
ren = SDL_CreateRenderer(win, -1, 0);
|
||||
ui::window::registerWindow(SDL_GetWindowID(win), eventHandler);
|
||||
tex = ui::createtexture(ren);
|
||||
if (!win) {
|
||||
win = SDL_CreateWindow("Z80 Debugger", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 83*CHR_W, 34*CHR_H, SDL_WINDOW_RESIZABLE);
|
||||
ren = SDL_CreateRenderer(win, -1, 0);
|
||||
ui::window::registerWindow(SDL_GetWindowID(win), eventHandler);
|
||||
tex = ui::createtexture(ren);
|
||||
}
|
||||
focus();
|
||||
}
|
||||
|
||||
z80debug::refresh();
|
||||
void focus()
|
||||
{
|
||||
if (win) {
|
||||
SDL_RaiseWindow(win);
|
||||
z80debug::refresh();
|
||||
}
|
||||
}
|
||||
|
||||
void hide()
|
||||
@@ -176,6 +163,7 @@ namespace z80debug
|
||||
is_debugging = is_paused = false;
|
||||
//hide();
|
||||
refresh();
|
||||
zxscreen::focus();
|
||||
zx_ula::sound_enable();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user