MCPcopy Create free account
hub / github.com/CE-Programming/CEmu / main

Function main

gui/sdl/main.c:202–308  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

200}
201
202int main(int argc, char **argv) {
203 static cemu_sdl_t cemu;
204
205 cemu.limit = 100;
206 cemu.fullscreen = 0;
207 cemu.image = NULL;
208 cemu.rom = NULL;
209 cemu.dma = 1;
210 cemu.gamma = 0;
211
212 for (;;) {
213 int c;
214 int number;
215 int option_index = 0;
216
217 static const struct option long_options[] = {
218 {"fullscreen", no_argument, 0, 'f' },
219 {"rom", required_argument, 0, 'r' },
220 {"image", required_argument, 0, 'i' },
221 {"limit", required_argument, 0, 'l' },
222 {"nodma", no_argument, 0, 'd' },
223 {"gamma", no_argument, 0, 'g' },
224 {"keymap", required_argument, 0, 'k' },
225 {"asic", required_argument, 0, 'a' },
226 {"python", no_argument, 0, 'p' },
227 {"nonpython", no_argument, 0, 'P' },
228 {}
229 };
230
231 c = getopt_long(argc, argv, "fr:i:l:dgk:a:pP", long_options, &option_index);
232 if (c == -1) {
233 break;
234 }
235
236 switch (c) {
237 case 'f':
238 fprintf(stdout, "fullscreen: yes\n");
239 cemu.fullscreen = 1;
240 break;
241
242 case 'r':
243 fprintf(stdout, "rom: %s\n", optarg);
244 cemu.rom = optarg;
245 break;
246
247 case 'i':
248 fprintf(stdout, "image: %s\n", optarg);
249 cemu.image = optarg;
250 break;
251
252 case 'l':
253 number = atoi(optarg);
254 fprintf(stdout, "limit: %d\n", number);
255 cemu.limit = number;
256 break;
257
258 case 'd':
259 fprintf(stdout, "dma: no\n");

Callers

nothing calls this directly

Calls 1

sdl_event_loopFunction · 0.85

Tested by

no test coverage detected