starting work on GUI

This commit is contained in:
simuuz 2021-10-06 21:04:23 +02:00
parent 431b6e7497
commit baaee9ecc6
3 changed files with 16 additions and 4 deletions

7
.gitignore vendored
View file

@ -1,4 +1,5 @@
build
build-release
cmake-build-*
*build*
.idea
.cache
.vscode
*.json

View file

@ -96,6 +96,15 @@ void render_menubar() {
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Emulation")) {
if(strcmp(n64sys.rom_path, "") != 0) {
reset_n64system();
n64_load_rom(n64sys.rom_path);
pif_rom_execute();
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("Window"))
{
if (ImGui::MenuItem("Metrics", nullptr, show_metrics_window)) { show_metrics_window = !show_metrics_window; }

View file

@ -47,7 +47,9 @@ void n64_load_rom(const char* rom_path) {
gamedb_match(&n64sys);
devices_init(n64sys.mem.save_type);
init_savedata(&n64sys.mem, rom_path);
strcpy(n64sys.rom_path, rom_path);
if (n64sys.rom_path != rom_path) {
strcpy(n64sys.rom_path, rom_path);
}
}
void mprotect_error(const char* thing) {