Skip to content

Commit 49767b3

Browse files
authored
Make it possible to run ruisapp both as console and GUI app. (#22)
* Make it possible to run ruisapp both as console and GUI app. * Fix argv casts.
1 parent 410474c commit 49767b3

1 file changed

Lines changed: 8 additions & 2 deletions

File tree

src/ruisapp/glue/windows/glue.cxx

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -821,8 +821,14 @@ int WINAPI WinMain(
821821
int n_cmd_show // Window Show State
822822
)
823823
{
824-
// TODO: pass argc and argv
825-
ruisapp::winmain(0, nullptr);
824+
ruisapp::winmain(__argc, const_cast<const char**>(__argv));
825+
826+
return 0;
827+
}
828+
829+
int main(int argc, const char** argv)
830+
{
831+
ruisapp::winmain(argc, argv);
826832

827833
return 0;
828834
}

0 commit comments

Comments
 (0)