mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-08-25 19:55:50 +00:00
clean up update logic some more
This commit is contained in:
parent
252fd286ad
commit
4d57b3b605
4 changed files with 6 additions and 21 deletions
|
@ -2932,18 +2932,6 @@ void CEXISlippi::handleLogOutRequest()
|
|||
user->LogOut();
|
||||
}
|
||||
|
||||
void CEXISlippi::handleUpdateAppRequest()
|
||||
{
|
||||
#ifdef __APPLE__
|
||||
CriticalAlertT("Automatic updates are not available for macOS, please get the latest update from "
|
||||
"slippi.gg/netplay.");
|
||||
#else
|
||||
Host_LowerWindow();
|
||||
user->UpdateApp();
|
||||
Host_Exit();
|
||||
#endif
|
||||
}
|
||||
|
||||
void CEXISlippi::prepareOnlineStatus()
|
||||
{
|
||||
m_read_queue.clear();
|
||||
|
@ -3198,7 +3186,7 @@ void CEXISlippi::DMAWrite(u32 _uAddr, u32 _uSize)
|
|||
handleChatMessage(&memPtr[bufLoc + 1]);
|
||||
break;
|
||||
case CMD_UPDATE:
|
||||
handleUpdateAppRequest();
|
||||
user->UpdateApp();
|
||||
break;
|
||||
case CMD_GET_NEW_SEED:
|
||||
prepareNewSeed();
|
||||
|
|
|
@ -185,7 +185,6 @@ private:
|
|||
bool shouldAdvanceOnlineFrame(s32 frame);
|
||||
void handleLogInRequest();
|
||||
void handleLogOutRequest();
|
||||
void handleUpdateAppRequest();
|
||||
void prepareOnlineStatus();
|
||||
void handleConnectionCleanup();
|
||||
void prepareNewSeed();
|
||||
|
|
|
@ -178,19 +178,19 @@ void SlippiUser::OpenLogInPage()
|
|||
RunSystemCommand(command);
|
||||
}
|
||||
|
||||
bool SlippiUser::UpdateApp()
|
||||
void SlippiUser::UpdateApp()
|
||||
{
|
||||
#if defined(__APPLE__) || defined(_WIN32)
|
||||
CriticalAlertT("Dolphin auto updates are not available on standalone builds. Migrate to "
|
||||
"the Slippi Launcher at your earliest convenience");
|
||||
return false;
|
||||
return;
|
||||
#else
|
||||
const char* appimage_path = getenv("APPIMAGE");
|
||||
const char* appmount_path = getenv("APPDIR");
|
||||
if (!appimage_path)
|
||||
{
|
||||
CriticalAlertT("Automatic updates are not available for non-AppImage Linux builds.");
|
||||
return false;
|
||||
return;
|
||||
}
|
||||
std::string path(appimage_path);
|
||||
std::string mount_path(appmount_path);
|
||||
|
@ -198,7 +198,7 @@ bool SlippiUser::UpdateApp()
|
|||
WARN_LOG(SLIPPI, "Executing app update command: %s", command.c_str());
|
||||
RunSystemCommand(command);
|
||||
CriticalAlertT("Dolphin failed to update, please head over to the Slippi Discord for support.");
|
||||
return true;
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
|
@ -261,8 +261,6 @@ std::string SlippiUser::getUserFilePath()
|
|||
#if defined(__APPLE__)
|
||||
std::string user_file_path =
|
||||
File::GetBundleDirectory() + "/Contents/Resources" + DIR_SEP + "user.json";
|
||||
#elif defined(_WIN32)
|
||||
std::string user_file_path = File::GetExeDirectory() + DIR_SEP + "user.json";
|
||||
#else
|
||||
std::string user_file_path = File::GetUserPath(F_USERJSON_IDX);
|
||||
#endif
|
||||
|
|
|
@ -28,7 +28,7 @@ public:
|
|||
|
||||
bool AttemptLogin();
|
||||
void OpenLogInPage();
|
||||
bool UpdateApp();
|
||||
void UpdateApp();
|
||||
void ListenForLogIn();
|
||||
void LogOut();
|
||||
void OverwriteLatestVersion(std::string version);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue