Mercurial > repos > blastem
comparison io.c @ 883:9f149f0e98b7
It is now possible to switch back and forth between the menu ROM and the game
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 13 Nov 2015 19:15:37 -0800 |
parents | 41f73c76b978 |
children | 252dfd29831d |
comparison
equal
deleted
inserted
replaced
882:75453bf2ffac | 883:9f149f0e98b7 |
---|---|
291 printf("Setting speed to %d\n", speeds[current_speed]); | 291 printf("Setting speed to %d\n", speeds[current_speed]); |
292 set_speed_percent(genesis, binding->value); | 292 set_speed_percent(genesis, binding->value); |
293 } | 293 } |
294 break; | 294 break; |
295 case UI_EXIT: | 295 case UI_EXIT: |
296 exit(0); | 296 genesis->m68k->should_return = 1; |
297 } | 297 } |
298 break; | 298 break; |
299 } | 299 } |
300 } | 300 } |
301 | 301 |
607 unlink(sock_name); | 607 unlink(sock_name); |
608 cleanup_sock: | 608 cleanup_sock: |
609 close(ports[i].device.stream.listen_fd); | 609 close(ports[i].device.stream.listen_fd); |
610 ports[i].device_type = IO_NONE; | 610 ports[i].device_type = IO_NONE; |
611 } | 611 } |
612 } else | 612 } else |
613 #endif | 613 #endif |
614 if (ports[i].device_type == IO_GAMEPAD3 || ports[i].device_type == IO_GAMEPAD6) { | 614 if (ports[i].device_type == IO_GAMEPAD3 || ports[i].device_type == IO_GAMEPAD6) { |
615 printf("IO port %s connected to gamepad #%d with type '%s'\n", io_name(i), ports[i].device.pad.gamepad_num + 1, device_type_names[ports[i].device_type]); | 615 printf("IO port %s connected to gamepad #%d with type '%s'\n", io_name(i), ports[i].device.pad.gamepad_num + 1, device_type_names[ports[i].device_type]); |
616 } else { | 616 } else { |
617 printf("IO port %s connected to device '%s'\n", io_name(i), device_type_names[ports[i].device_type]); | 617 printf("IO port %s connected to device '%s'\n", io_name(i), device_type_names[ports[i].device_type]); |
670 char numstr[] = "00"; | 670 char numstr[] = "00"; |
671 tern_node * pads = tern_get_node(tern_find_path(config, "bindings\0pads\0")); | 671 tern_node * pads = tern_get_node(tern_find_path(config, "bindings\0pads\0")); |
672 if (pads) { | 672 if (pads) { |
673 for (int i = 0; i < 100 && i < render_num_joysticks(); i++) | 673 for (int i = 0; i < 100 && i < render_num_joysticks(); i++) |
674 { | 674 { |
675 | 675 |
676 if (i < 10) { | 676 if (i < 10) { |
677 numstr[0] = i + '0'; | 677 numstr[0] = i + '0'; |
678 numstr[1] = 0; | 678 numstr[1] = 0; |
679 } else { | 679 } else { |
680 numstr[0] = i/10 + '0'; | 680 numstr[0] = i/10 + '0'; |