mirror of
https://forgejo.xatacraft.ru/Sunshine/mkxp-sunshine.git
synced 2026-08-19 21:39:57 +00:00
Windows_AllocConsole config
This commit is contained in:
parent
3a9f437e83
commit
c3b0565714
4 changed files with 21 additions and 9 deletions
|
|
@ -176,3 +176,8 @@
|
|||
# this number. Maximum: 64.
|
||||
#
|
||||
# SE.sourceCount=6
|
||||
|
||||
# [Windows only] Alloc console
|
||||
# Launch a console window with debug information along with the game.
|
||||
#
|
||||
# Windows_AllocConsole=false
|
||||
|
|
|
|||
|
|
@ -90,7 +90,8 @@ void Config::read(int argc, char *argv[]){
|
|||
PO_DESC(allowSymlinks, bool, false) \
|
||||
PO_DESC(iconPath, std::string, "") \
|
||||
PO_DESC(SE.sourceCount, int, 6) \
|
||||
PO_DESC(pathCache, bool, true)
|
||||
PO_DESC(pathCache, bool, true) \
|
||||
PO_DESC(Windows_AllocConsole, bool, false)
|
||||
|
||||
// Not gonna take your shit boost
|
||||
#define GUARD_ALL( exp ) try { exp } catch(...) {}
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ struct Config{
|
|||
bool printFPS;
|
||||
bool fullscreen;
|
||||
bool fixedAspectRatio;
|
||||
bool Windows_AllocConsole;
|
||||
bool smoothScaling;
|
||||
bool vsync;
|
||||
bool EnableSixteenByNine;
|
||||
|
|
|
|||
13
src/main.cpp
13
src/main.cpp
|
|
@ -218,6 +218,15 @@ static void setGamePathInRegistry() {
|
|||
}
|
||||
int main(int argc, char *argv[]){
|
||||
char msg[512];
|
||||
/* now we load the config */
|
||||
Config conf;
|
||||
conf.read(argc, argv);
|
||||
#if defined WIN32
|
||||
if(conf.Windows_AllocConsole == true){
|
||||
|
||||
}
|
||||
#endif
|
||||
|
||||
loadLanguageMetadata(); //there will be a segfault on fclose if I don't move it here
|
||||
|
||||
SDL_SetHint(SDL_HINT_VIDEO_MINIMIZE_ON_FOCUS_LOSS, "0");
|
||||
|
|
@ -267,10 +276,6 @@ int main(int argc, char *argv[]){
|
|||
/* Initialize physfs here so that config can call PHYSFS_getPrefDir */
|
||||
PHYSFS_init(argv[0]);
|
||||
|
||||
/* now we load the config */
|
||||
Config conf;
|
||||
conf.read(argc, argv);
|
||||
|
||||
if (!conf.gameFolder.empty())
|
||||
if (chdir(conf.gameFolder.c_str()) != 0){
|
||||
showInitError(std::string("Unable to switch into gameFolder ") + conf.gameFolder);
|
||||
|
|
|
|||
Loading…
Reference in a new issue