Browse Source

fix socketnotifier, web service def

Signed-off-by: crueter <crueter@eden-emu.dev>
pull/194/head
crueter 7 months ago
parent
commit
35a0197037
No known key found for this signature in database GPG Key ID: 425ACD2D4830EBC6
  1. 18
      src/common/android/multiplayer/multiplayer.cpp
  2. 4
      src/core/CMakeLists.txt
  3. 2
      src/yuzu/main.cpp
  4. 2
      src/yuzu/main.h

18
src/common/android/multiplayer/multiplayer.cpp

@ -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
// LOG_INFO(WebService, "Web Service enabled");
#ifdef ENABLE_WEB_SERVICE
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
// LOG_INFO(WebService, "Web Service disabled");
//#endif
#else
LOG_ERROR(WebService, "Web Service disabled");
#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
// verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
//#endif
#else
verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
#endif
} else { } else {
verify_backend = std::make_unique<Network::VerifyUser::NullBackend>(); verify_backend = std::make_unique<Network::VerifyUser::NullBackend>();
} }

4
src/core/CMakeLists.txt

@ -1199,8 +1199,8 @@ if (MINGW)
endif() endif()
if (ENABLE_WEB_SERVICE) if (ENABLE_WEB_SERVICE)
target_compile_definitions(core PRIVATE -DENABLE_WEB_SERVICE)
target_link_libraries(core PRIVATE web_service)
target_compile_definitions(core PUBLIC -DENABLE_WEB_SERVICE)
target_link_libraries(core PUBLIC web_service)
endif() endif()
if (HAS_NCE) if (HAS_NCE)

2
src/yuzu/main.cpp

@ -1908,7 +1908,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;

2
src/yuzu/main.h

@ -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…
Cancel
Save