Skip to content

Commit

Permalink
Sorta working console debugger
Browse files Browse the repository at this point in the history
  • Loading branch information
emoon committed Jun 6, 2024
1 parent b86cc4f commit ef8f052
Showing 1 changed file with 20 additions and 12 deletions.
32 changes: 20 additions & 12 deletions src/dummy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ bool specialmonitor_need_genlock() {
}

void setmouseactive(int, int) {
UNIMPLEMENTED();
//UNIMPLEMENTED();
}

void screenshot(int monid, int, int) {
Expand Down Expand Up @@ -448,7 +448,7 @@ void a4091_add_scsi_unit(int, uaedev_config_info*, romconfig*) {
UNIMPLEMENTED();
}
void activate_console() {
UNIMPLEMENTED();
//UNIMPLEMENTED();
}

void alf3_add_scsi_unit(int, uaedev_config_info*, romconfig*) {
Expand Down Expand Up @@ -599,12 +599,17 @@ int compiler_init() {
}

void console_flush() {
UNIMPLEMENTED();
fflush(stdout);
}

int console_get(char*, int) {
UNIMPLEMENTED();
return 0;
int console_get(char* out, int maxlen) {
TCHAR* res = fgets(out, maxlen, stdin);
if (res == NULL) {
return -1;
}

int len = strlen(out);
return len - 1;
}

bool console_isch() {
Expand Down Expand Up @@ -981,6 +986,9 @@ void unlockscr(struct vidbuffer* vb_in, int y_start, int y_end) {
exit(0);
break;
case SDL_KEYDOWN: // User presses a key
if (e.key.keysym.sym == SDLK_d) { // If the key is ESC
activate_debugger();
}
if (e.key.keysym.sym == SDLK_ESCAPE) { // If the key is ESC
quit_program == UAE_QUIT;
exit(0);
Expand Down Expand Up @@ -1095,7 +1103,6 @@ bool is_mainthread() {
}

bool ismouseactive() {
UNIMPLEMENTED();
return false;
}

Expand Down Expand Up @@ -1565,8 +1572,10 @@ void toggle_mousegrab() {
UNIMPLEMENTED();
}

void to_upper(char*, int) {
UNIMPLEMENTED();
void to_upper(char* s, int len) {
for (int i = 0; i < len; i++) {
s[i] = toupper(s[i]);
}
}

uae_u32 trifecta_ncr9x_scsi_get(unsigned int, int) {
Expand Down Expand Up @@ -1649,7 +1658,7 @@ bool uae_slirp_start() {
}

void update_debug_info() {
UNIMPLEMENTED();
//UNIMPLEMENTED();
}

void updatedisplayarea(int) {
Expand Down Expand Up @@ -1828,7 +1837,6 @@ int input_get_default_mouse(uae_input_device*, int, int, int, bool, bool, bool)
}

int isfullscreen() {
UNIMPLEMENTED();
return 0;
}

Expand Down Expand Up @@ -1886,7 +1894,7 @@ void setcapslockstate(int) {
}

void setmouseactivexy(int, int, int, int) {
UNIMPLEMENTED();
//UNIMPLEMENTED();
}

uae_u32 squirrel_ncr9x_scsi_get(unsigned int, int) {
Expand Down

0 comments on commit ef8f052

Please sign in to comment.