mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-06-07 11:31:39 +12:00
Separate http server to a new file
This commit is contained in:
parent
77ea84373f
commit
b8fa5fc86d
5 changed files with 162 additions and 134 deletions
|
@ -14,11 +14,12 @@
|
|||
#include "io_file.hpp"
|
||||
#include "memory.hpp"
|
||||
#include "gl_state.hpp"
|
||||
#ifdef PANDA3DS_ENABLE_HTTP_SERVER
|
||||
#include "httpserver.hpp"
|
||||
#endif
|
||||
|
||||
enum class ROMType { None, ELF, NCSD, CXI };
|
||||
|
||||
enum class HttpAction { None, Screenshot, PressKey, ReleaseKey };
|
||||
|
||||
class Emulator {
|
||||
CPU cpu;
|
||||
GPU gpu;
|
||||
|
@ -49,10 +50,7 @@ class Emulator {
|
|||
bool running = true;
|
||||
|
||||
#ifdef PANDA3DS_ENABLE_HTTP_SERVER
|
||||
std::atomic_bool pendingAction = false;
|
||||
HttpAction action = HttpAction::None;
|
||||
std::mutex actionMutex = {};
|
||||
u32 pendingKey = 0;
|
||||
HttpServer httpServer;
|
||||
#endif
|
||||
|
||||
// Keep the handle for the ROM here to reload when necessary and to prevent deleting it
|
||||
|
@ -80,6 +78,6 @@ class Emulator {
|
|||
void initGraphicsContext();
|
||||
|
||||
#ifdef PANDA3DS_ENABLE_HTTP_SERVER
|
||||
void startHttpServer();
|
||||
void pollHttpServer();
|
||||
#endif
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue