summaryrefslogtreecommitdiff
path: root/soh/src
diff options
context:
space:
mode:
authorlouist103 <35883445+louist103@users.noreply.github.com>2023-04-25 00:01:17 -0400
committerGitHub <noreply@github.com>2023-04-25 00:01:17 -0400
commitaea46e7cb290b770ece05112259e1b09d77b35f2 (patch)
tree12472bf4b8bdc95d6add92439d3ef79c340a786a /soh/src
parent44d3f1ccbbdcca85e969947c2a4bb6099f927a17 (diff)
Implement built in Extractor for Windows (#2730)
* wip * const * split zapd into two targets * Workingish. * fix working dir and copy xmls on build (#2) * dont change current working dir with dialog prompts * copy asset xmls to target dir * make zpadlib public * Messagebox. * Check for WIN32 * threading * Cleanups to the exporter and main. * Multi extraction. * Fix byteswap header includes. * Fix another byteswap include. * fix again. * stddef size_t * Add other targets for ZAPDLib * Non windows. * IDYES IDNO * Linux fixes * hopefully remove switch and wiiu from building extractor * Please? * validate roms and add another valid rom * ifdef out extract.h for switch and wiiu * Maybe update lux * Remove ZAPDlib from switch and WiiU * more rules * Update soh/soh/Extractor/Extract.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update ZAPDTR/ZAPD/ExecutableMain.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update ZAPDTR/ZAPD/CMakeLists.txt Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update ZAPDTR/ZAPD/GameConfig.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update ZAPDTR/ZAPD/Globals.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update ZAPDTR/ZAPD/Main.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/CMakeLists.txt Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/soh/Extractor/Extract.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/soh/Extractor/Extract.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * Update soh/soh/Extractor/Extract.cpp Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com> * the last fix * Add context to a comment --------- Co-authored-by: Adam Bird <archez39@me.com> Co-authored-by: Adam Bird <Archez@users.noreply.github.com> Co-authored-by: briaguya <70942617+briaguya-ai@users.noreply.github.com>
Diffstat (limited to 'soh/src')
-rw-r--r--soh/src/code/main.c17
1 files changed, 13 insertions, 4 deletions
diff --git a/soh/src/code/main.c b/soh/src/code/main.c
index 08e9ecdc1..7ecff0b63 100644
--- a/soh/src/code/main.c
+++ b/soh/src/code/main.c
@@ -10,7 +10,6 @@
#include <libultraship/bridge.h>
#include "soh/CrashHandlerExp.h"
-
s32 gScreenWidth = SCREEN_WIDTH;
s32 gScreenHeight = SCREEN_HEIGHT;
size_t gSystemHeapSize = 0;
@@ -44,11 +43,21 @@ void Main_LogSystemHeap(void) {
}
#ifdef _WIN32
-int APIENTRY WinMain(HINSTANCE hInst, HINSTANCE hInstPrev, PSTR cmdline, int cmdshow)
-#else
-int main(int argc, char** argv)
+int SDL_main(int argc, char** argv)
+{
+ AllocConsole();
+ (void)freopen("CONIN$", "r", stdin);
+ (void)freopen("CONOUT$", "w", stdout);
+ (void)freopen("CONOUT$", "w", stderr);
+#ifndef _DEBUG
+ ShowWindow(GetConsoleWindow(), SW_HIDE);
#endif
+
+#else //_WIN32
+int main(int argc, char** argv)
{
+#endif
+
GameConsole_Init();
InitOTR();
// TODO: Was moved to below InitOTR because it requires window to be setup. But will be late to catch crashes.