comment out imgui stuff for now

This commit is contained in:
CocoSimone
2022-08-11 19:54:03 +02:00
parent 402062920e
commit 2e05e81c53
10 changed files with 40 additions and 25 deletions

View File

@@ -1,5 +1,6 @@
#include <App.hpp>
#include <parallel-rdp/ParallelRDPWrapper.hpp>
#include <nfd.hpp>
void App::Run() {
// Main loop
@@ -7,11 +8,24 @@ void App::Run() {
while (!done) {
SDL_Event event;
while (SDL_PollEvent(&event)) {
ImGui_ImplSDL2_ProcessEvent(&event);
//ImGui_ImplSDL2_ProcessEvent(&event);
if (event.type == SDL_QUIT)
done = true;
if (window.gotClosed(event))
done = true;
if(event.type == SDL_KEYDOWN) {
switch(event.key.keysym.sym) {
case SDLK_o: {
nfdchar_t* outpath;
const nfdu8filteritem_t filter {"Nintendo 64 roms", "n64,z64,v64,N64,Z64,V64"};
nfdresult_t result = NFD_OpenDialog(&outpath, &filter, 1, nullptr);
if(result == NFD_OKAY) {
core.LoadROM(outpath);
NFD_FreePath(outpath);
}
} break;
}
}
}
if(core.initialized)
@@ -19,5 +33,7 @@ void App::Run() {
if(core.initialized) UpdateScreenParallelRdp(window, core.GetVI());
else UpdateScreenParallelRdpNoGame(window);
SDL_Delay(16);
}
}
}