-
Notifications
You must be signed in to change notification settings - Fork 468
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Finish refactoring of platform code.
This commit finally unifies all main() functions and moves the few remaining application-wide functions where they belong.
- Loading branch information
1 parent
350d2ad
commit 4987d12
Showing
19 changed files
with
277 additions
and
374 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
//----------------------------------------------------------------------------- | ||
// Our main() function for the graphical interface. | ||
// | ||
// Copyright 2018 <whitequark@whitequark.org> | ||
//----------------------------------------------------------------------------- | ||
#include "solvespace.h" | ||
|
||
using namespace SolveSpace; | ||
|
||
int main(int argc, char** argv) { | ||
std::vector<std::string> args = InitPlatform(argc, argv); | ||
|
||
Platform::InitGui(argc, argv); | ||
Platform::Open3DConnexion(); | ||
SS.Init(); | ||
|
||
if(args.size() >= 2) { | ||
if(args.size() > 2) { | ||
dbp("Only the first file passed on command line will be opened."); | ||
} | ||
|
||
SS.Load(Platform::Path::From(args.back()).Expand(/*fromCurrentDirectory=*/true)); | ||
} | ||
|
||
Platform::RunGui(); | ||
|
||
Platform::Close3DConnexion(); | ||
SS.Clear(); | ||
|
||
SK.Clear(); | ||
|
||
return 0; | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.