mirror of
				https://github.com/PabloMK7/citra.git
				synced 2025-10-30 21:30:04 +00:00 
			
		
		
		
	Move webservice settings to own file
This commit is contained in:
		
							parent
							
								
									88a4759702
								
							
						
					
					
						commit
						fa0cb52a5d
					
				
					 14 changed files with 104 additions and 76 deletions
				
			
		|  | @ -10,7 +10,6 @@ | |||
| #include <string> | ||||
| #include <thread> | ||||
| #include <cryptopp/base64.h> | ||||
| #include <glad/glad.h> | ||||
| 
 | ||||
| #ifdef _WIN32 | ||||
| // windows.h needs to be included before shellapi.h
 | ||||
|  | @ -28,9 +27,8 @@ | |||
| #include "common/scm_rev.h" | ||||
| #include "common/string_util.h" | ||||
| #include "core/announce_multiplayer_session.h" | ||||
| #include "core/core.h" | ||||
| #include "core/settings.h" | ||||
| #include "network/network.h" | ||||
| #include "network/network_settings.h" | ||||
| #include "network/room.h" | ||||
| #include "network/verify_user.h" | ||||
| 
 | ||||
|  | @ -170,9 +168,6 @@ int main(int argc, char** argv) { | |||
|     int option_index = 0; | ||||
|     char* endarg; | ||||
| 
 | ||||
|     // This is just to be able to link against core
 | ||||
|     gladLoadGL(); | ||||
| 
 | ||||
|     std::string room_name; | ||||
|     std::string room_description; | ||||
|     std::string password; | ||||
|  | @ -300,15 +295,15 @@ int main(int argc, char** argv) { | |||
|     if (announce) { | ||||
|         if (username.empty()) { | ||||
|             std::cout << "Hosting a public room\n\n"; | ||||
|             Settings::values.web_api_url = web_api_url; | ||||
|             Settings::values.citra_username = UsernameFromDisplayToken(token); | ||||
|             username = Settings::values.citra_username; | ||||
|             Settings::values.citra_token = TokenFromDisplayToken(token); | ||||
|             NetSettings::values.web_api_url = web_api_url; | ||||
|             NetSettings::values.citra_username = UsernameFromDisplayToken(token); | ||||
|             username = NetSettings::values.citra_username; | ||||
|             NetSettings::values.citra_token = TokenFromDisplayToken(token); | ||||
|         } else { | ||||
|             std::cout << "Hosting a public room\n\n"; | ||||
|             Settings::values.web_api_url = web_api_url; | ||||
|             Settings::values.citra_username = username; | ||||
|             Settings::values.citra_token = token; | ||||
|             NetSettings::values.web_api_url = web_api_url; | ||||
|             NetSettings::values.citra_username = username; | ||||
|             NetSettings::values.citra_token = token; | ||||
|         } | ||||
|     } | ||||
|     if (!announce && enable_citra_mods) { | ||||
|  | @ -327,7 +322,8 @@ int main(int argc, char** argv) { | |||
|     std::unique_ptr<Network::VerifyUser::Backend> verify_backend; | ||||
|     if (announce) { | ||||
| #ifdef ENABLE_WEB_SERVICE | ||||
|         verify_backend = std::make_unique<WebService::VerifyUserJWT>(Settings::values.web_api_url); | ||||
|         verify_backend = | ||||
|             std::make_unique<WebService::VerifyUserJWT>(NetSettings::values.web_api_url); | ||||
| #else | ||||
|         std::cout | ||||
|             << "Citra Web Services is not available with this build: validation is disabled.\n\n"; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue