Program Execution Argument Extraction (#5807)

* Add function to be able to feed specific path into to process programmatically, and setup drag and drop functionality.

* Encapsulate dropped file functionality from Switch and Wii U.

* Fix dropped file detection, and fix ShowYesNowBox return checking.
This commit is contained in:
Malkierian
2025-10-09 16:51:04 -07:00
committed by GitHub
parent 57c368aa2c
commit 52a8f6c281
6 changed files with 60 additions and 7 deletions

View File

@@ -45,7 +45,7 @@ void Main_LogSystemHeap(void) {
}
#ifdef _WIN32
int SDL_main(int argc, char** argv) {
int SDL_main(int argc, char* argv[]) {
AllocConsole();
(void)freopen("CONIN$", "r", stdin);
(void)freopen("CONOUT$", "w", stdout);
@@ -57,11 +57,10 @@ int SDL_main(int argc, char** argv) {
setlocale(LC_ALL, ".UTF8");
#else //_WIN32
int main(int argc, char** argv) {
int main(int argc, char* argv[]) {
#endif
GameConsole_Init();
InitOTR();
InitOTR(argc, argv);
// TODO: Was moved to below InitOTR because it requires window to be setup. But will be late to catch crashes.
CrashHandlerRegisterCallback(CrashHandler_PrintSohData);
BootCommands_Init();