forked from eden-emu/eden
fix socketnotifier, web service def
Signed-off-by: crueter <crueter@eden-emu.dev>
This commit is contained in:
parent
1f557a907d
commit
de16e75f29
5 changed files with 14 additions and 14 deletions
|
@ -169,7 +169,7 @@ android {
|
||||||
arguments(
|
arguments(
|
||||||
"-DENABLE_QT=0", // Don't use QT
|
"-DENABLE_QT=0", // Don't use QT
|
||||||
"-DENABLE_SDL2=0", // Don't use SDL
|
"-DENABLE_SDL2=0", // Don't use SDL
|
||||||
"-DENABLE_WEB_SERVICE=1", // Enable web service
|
"-DENABLE_WEB_SERVICE=ON", // Enable web service
|
||||||
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
"-DANDROID_ARM_NEON=true", // cryptopp requires Neon to work
|
||||||
"-DYUZU_USE_BUNDLED_VCPKG=ON",
|
"-DYUZU_USE_BUNDLED_VCPKG=ON",
|
||||||
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
|
"-DYUZU_USE_BUNDLED_FFMPEG=ON",
|
||||||
|
|
|
@ -205,8 +205,8 @@ NetPlayStatus AndroidMultiplayer::NetPlayCreateRoom(const std::string &ipaddress
|
||||||
|
|
||||||
std::string token;
|
std::string token;
|
||||||
// TODO(alekpop): properly handle the compile definition, it's not working right
|
// TODO(alekpop): properly handle the compile definition, it's not working right
|
||||||
//#ifdef ENABLE_WEB_SERVICE
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
// LOG_INFO(WebService, "Web Service enabled");
|
LOG_INFO(WebService, "Web Service enabled");
|
||||||
if (isPublic) {
|
if (isPublic) {
|
||||||
WebService::Client client(Settings::values.web_api_url.GetValue(),
|
WebService::Client client(Settings::values.web_api_url.GetValue(),
|
||||||
Settings::values.eden_username.GetValue(),
|
Settings::values.eden_username.GetValue(),
|
||||||
|
@ -220,9 +220,9 @@ NetPlayStatus AndroidMultiplayer::NetPlayCreateRoom(const std::string &ipaddress
|
||||||
LOG_INFO(WebService, "Successfully requested external JWT: size={}", token.size());
|
LOG_INFO(WebService, "Successfully requested external JWT: size={}", token.size());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//#else
|
#else
|
||||||
// LOG_INFO(WebService, "Web Service disabled");
|
LOG_ERROR(WebService, "Web Service disabled");
|
||||||
//#endif
|
#endif
|
||||||
|
|
||||||
member->Join(username, ipaddress.c_str(), static_cast<u16>(port), 0, Network::NoPreferredIP,
|
member->Join(username, ipaddress.c_str(), static_cast<u16>(port), 0, Network::NoPreferredIP,
|
||||||
password, token);
|
password, token);
|
||||||
|
@ -432,12 +432,12 @@ std::vector<std::string> AndroidMultiplayer::NetPlayGetBanList() {
|
||||||
std::unique_ptr<Network::VerifyUser::Backend> AndroidMultiplayer::CreateVerifyBackend(bool use_validation) {
|
std::unique_ptr<Network::VerifyUser::Backend> AndroidMultiplayer::CreateVerifyBackend(bool use_validation) {
|
||||||
std::unique_ptr<Network::VerifyUser::Backend> verify_backend;
|
std::unique_ptr<Network::VerifyUser::Backend> verify_backend;
|
||||||
if (use_validation) {
|
if (use_validation) {
|
||||||
//#ifdef ENABLE_WEB_SERVICE
|
#ifdef ENABLE_WEB_SERVICE
|
||||||
verify_backend =
|
verify_backend =
|
||||||
std::make_unique<WebService::VerifyUserJWT>(Settings::values.web_api_url.GetValue());
|
std::make_unique<WebService::VerifyUserJWT>(Settings::values.web_api_url.GetValue());
|
||||||
//#else
|
#else
|
||||||
// verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
|
verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
|
||||||
//#endif
|
#endif
|
||||||
} else {
|
} else {
|
||||||
verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
|
verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
|
||||||
}
|
}
|
||||||
|
|
|
@ -1192,8 +1192,8 @@ if (MINGW)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (ENABLE_WEB_SERVICE)
|
if (ENABLE_WEB_SERVICE)
|
||||||
target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE)
|
target_compile_definitions(core PUBLIC -DENABLE_WEB_SERVICE)
|
||||||
target_link_libraries(core PRIVATE web_service)
|
target_link_libraries(core PUBLIC web_service)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
if (HAS_NCE)
|
if (HAS_NCE)
|
||||||
|
|
|
@ -1821,7 +1821,7 @@ void GMainWindow::HandleSigInterrupt(int sig) {
|
||||||
(void)ret;
|
(void)ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
void GMainWindow::OnSigInterruptNotifierActivated() {
|
void GMainWindow::OnSigInterruptNotifierActivated(QSocketDescriptor _, QSocketNotifier::Type _) {
|
||||||
sig_interrupt_notifier->setEnabled(false);
|
sig_interrupt_notifier->setEnabled(false);
|
||||||
|
|
||||||
char a;
|
char a;
|
||||||
|
|
|
@ -326,7 +326,7 @@ private:
|
||||||
#ifdef __unix__
|
#ifdef __unix__
|
||||||
void SetupSigInterrupts();
|
void SetupSigInterrupts();
|
||||||
static void HandleSigInterrupt(int);
|
static void HandleSigInterrupt(int);
|
||||||
void OnSigInterruptNotifierActivated();
|
void OnSigInterruptNotifierActivated(QSocketDescriptor socket, QSocketNotifier::Type type);
|
||||||
void SetGamemodeEnabled(bool state);
|
void SetGamemodeEnabled(bool state);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue