Add load_rom http server command

This commit is contained in:
offtkp 2023-07-26 16:36:37 +03:00
parent da3ec42326
commit 63f9cfe0c2
3 changed files with 60 additions and 4 deletions

View file

@ -4,6 +4,7 @@
#include <array>
#include <atomic>
#include <condition_variable>
#include <filesystem>
#include <map>
#include <memory>
#include <mutex>
@ -12,7 +13,7 @@
#include "helpers.hpp"
enum class HttpActionType { None, Screenshot, Key };
enum class HttpActionType { None, Screenshot, Key, LoadRom };
class Emulator;
namespace httplib {
@ -42,6 +43,7 @@ class HttpAction {
static std::unique_ptr<HttpAction> createScreenshotAction(DeferredResponseWrapper& response);
static std::unique_ptr<HttpAction> createKeyAction(uint32_t key, bool state);
static std::unique_ptr<HttpAction> createLoadRomAction(std::filesystem::path path, bool paused);
};
struct HttpServer {