summaryrefslogtreecommitdiff
path: root/src/yuzu_cmd/yuzu.cpp
diff options
context:
space:
mode:
authorGravatar adityaruplaha2018-04-21 13:22:34 +0530
committerGravatar adityaruplaha2018-04-21 13:24:33 +0530
commitf48d5e4c4c03ffc8c374b2ec5a2d2455050bbf8a (patch)
tree551cdec2d10712ab347dc204ceb0340f8fa29b9f /src/yuzu_cmd/yuzu.cpp
parentMerge pull request #323 from Hexagon12/stub-hid (diff)
downloadyuzu-f48d5e4c4c03ffc8c374b2ec5a2d2455050bbf8a.tar.gz
yuzu-f48d5e4c4c03ffc8c374b2ec5a2d2455050bbf8a.tar.xz
yuzu-f48d5e4c4c03ffc8c374b2ec5a2d2455050bbf8a.zip
SDL2: Implement fullscreen. (Original PR: citra-emu/citra#3607)
Diffstat (limited to 'src/yuzu_cmd/yuzu.cpp')
-rw-r--r--src/yuzu_cmd/yuzu.cpp12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/yuzu_cmd/yuzu.cpp b/src/yuzu_cmd/yuzu.cpp
index 261312f62..0a4644500 100644
--- a/src/yuzu_cmd/yuzu.cpp
+++ b/src/yuzu_cmd/yuzu.cpp
@@ -41,6 +41,7 @@ static void PrintHelp(const char* argv0) {
41 std::cout << "Usage: " << argv0 41 std::cout << "Usage: " << argv0
42 << " [options] <filename>\n" 42 << " [options] <filename>\n"
43 "-g, --gdbport=NUMBER Enable gdb stub on port NUMBER\n" 43 "-g, --gdbport=NUMBER Enable gdb stub on port NUMBER\n"
44 "-f, --fullscreen Start in fullscreen mode\n"
44 "-h, --help Display this help and exit\n" 45 "-h, --help Display this help and exit\n"
45 "-v, --version Output version information and exit\n"; 46 "-v, --version Output version information and exit\n";
46} 47}
@@ -67,15 +68,18 @@ int main(int argc, char** argv) {
67#endif 68#endif
68 std::string filepath; 69 std::string filepath;
69 70
71 bool fullscreen = false;
72
70 static struct option long_options[] = { 73 static struct option long_options[] = {
71 {"gdbport", required_argument, 0, 'g'}, 74 {"gdbport", required_argument, 0, 'g'},
75 {"fullscreen", no_argument, 0, 'f'},
72 {"help", no_argument, 0, 'h'}, 76 {"help", no_argument, 0, 'h'},
73 {"version", no_argument, 0, 'v'}, 77 {"version", no_argument, 0, 'v'},
74 {0, 0, 0, 0}, 78 {0, 0, 0, 0},
75 }; 79 };
76 80
77 while (optind < argc) { 81 while (optind < argc) {
78 char arg = getopt_long(argc, argv, "g:hv", long_options, &option_index); 82 char arg = getopt_long(argc, argv, "g:fhv", long_options, &option_index);
79 if (arg != -1) { 83 if (arg != -1) {
80 switch (arg) { 84 switch (arg) {
81 case 'g': 85 case 'g':
@@ -89,6 +93,10 @@ int main(int argc, char** argv) {
89 exit(1); 93 exit(1);
90 } 94 }
91 break; 95 break;
96 case 'f':
97 fullscreen = true;
98 NGLOG_INFO(Frontend, "Starting in fullscreen mode...");
99 break;
92 case 'h': 100 case 'h':
93 PrintHelp(argv[0]); 101 PrintHelp(argv[0]);
94 return 0; 102 return 0;
@@ -128,7 +136,7 @@ int main(int argc, char** argv) {
128 Settings::values.use_gdbstub = use_gdbstub; 136 Settings::values.use_gdbstub = use_gdbstub;
129 Settings::Apply(); 137 Settings::Apply();
130 138
131 std::unique_ptr<EmuWindow_SDL2> emu_window{std::make_unique<EmuWindow_SDL2>()}; 139 std::unique_ptr<EmuWindow_SDL2> emu_window{std::make_unique<EmuWindow_SDL2>(fullscreen)};
132 140
133 Core::System& system{Core::System::GetInstance()}; 141 Core::System& system{Core::System::GetInstance()};
134 142