mirror of
https://github.com/wheremyfoodat/Panda3DS.git
synced 2025-07-11 17:58:29 +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
19
include/httpserver.hpp
Normal file
19
include/httpserver.hpp
Normal file
|
@ -0,0 +1,19 @@
|
|||
#pragma once
|
||||
|
||||
#include <atomic>
|
||||
#include <mutex>
|
||||
#include "helpers.hpp"
|
||||
|
||||
enum class HttpAction { None, Screenshot, PressKey, ReleaseKey };
|
||||
|
||||
constexpr const char* httpServerScreenshotPath = "screenshot.png";
|
||||
|
||||
struct HttpServer
|
||||
{
|
||||
std::atomic_bool pendingAction = false;
|
||||
HttpAction action = HttpAction::None;
|
||||
std::mutex actionMutex = {};
|
||||
u32 pendingKey = 0;
|
||||
|
||||
void startHttpServer();
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue