/
mastercond
/
Solvespace-qt
Обзор
Документация
Войти
/
mastercond
/
Solvespace-qt
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
src/platform/entrygui.cpp
42 строки
1 KB
ruevs
Win32: Fix "File|Open...", "Save" and "Save As" when a command line argument is used.
17 окт 2020, 00:44
17 окт 2020, 00:44
3ea8ebf
Код
Авторство
О чём код?
//----------------------------------------------------------------------------- // Our main() function for the graphical interface. // // Copyright 2018 <whitequark@whitequark.org> //----------------------------------------------------------------------------- #include "solvespace.h" #if defined(WIN32) # include <windows.h> #endif using namespace SolveSpace; int main(int argc, char** argv) { std::vector<std::string> args = 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())); } Platform::RunGui(); Platform::Close3DConnexion(); SS.Clear(); SK.Clear(); Platform::ClearGui(); return 0; } #if defined(WIN32) int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, INT nCmdShow) { return main(0, NULL); } #endif