comparison bindings.c @ 2295:eb45ad9d8a3f

WIP "video" recording in APNG format
author Michael Pavone <pavone@retrodev.com>
date Fri, 10 Feb 2023 23:17:43 -0800
parents 4de40b13b55f
children b3832f73444f
comparison
equal deleted inserted replaced
2294:7e995fb948c3 2295:eb45ad9d8a3f
35 UI_TOGGLE_FULLSCREEN, 35 UI_TOGGLE_FULLSCREEN,
36 UI_SOFT_RESET, 36 UI_SOFT_RESET,
37 UI_RELOAD, 37 UI_RELOAD,
38 UI_SMS_PAUSE, 38 UI_SMS_PAUSE,
39 UI_SCREENSHOT, 39 UI_SCREENSHOT,
40 UI_RECORD_VIDEO,
40 UI_VGM_LOG, 41 UI_VGM_LOG,
41 UI_EXIT, 42 UI_EXIT,
42 UI_PLANE_DEBUG, 43 UI_PLANE_DEBUG,
43 UI_VRAM_DEBUG, 44 UI_VRAM_DEBUG,
44 UI_CRAM_DEBUG, 45 UI_CRAM_DEBUG,
409 break; 410 break;
410 case UI_SCREENSHOT: 411 case UI_SCREENSHOT:
411 if (allow_content_binds) { 412 if (allow_content_binds) {
412 char *path = get_content_config_path("ui\0screenshot_path\0", "ui\0screenshot_template\0", "blastem_%c.ppm"); 413 char *path = get_content_config_path("ui\0screenshot_path\0", "ui\0screenshot_template\0", "blastem_%c.ppm");
413 render_save_screenshot(path); 414 render_save_screenshot(path);
415 }
416 break;
417 case UI_RECORD_VIDEO:
418 if (allow_content_binds) {
419 if (render_saving_video()) {
420 render_end_video();
421 } else {
422 char *path = get_content_config_path("ui\0video_path\0", "ui\0video_template\0", "blastem_%c.apng");
423 render_save_video(path);
424 }
414 } 425 }
415 break; 426 break;
416 case UI_VGM_LOG: 427 case UI_VGM_LOG:
417 if (allow_content_binds && current_system->start_vgm_log) { 428 if (allow_content_binds && current_system->start_vgm_log) {
418 if (current_system->vgm_logging) { 429 if (current_system->vgm_logging) {
676 *subtype_a = UI_RELOAD; 687 *subtype_a = UI_RELOAD;
677 } else if (!strcmp(target + 3, "sms_pause")) { 688 } else if (!strcmp(target + 3, "sms_pause")) {
678 *subtype_a = UI_SMS_PAUSE; 689 *subtype_a = UI_SMS_PAUSE;
679 } else if (!strcmp(target + 3, "screenshot")) { 690 } else if (!strcmp(target + 3, "screenshot")) {
680 *subtype_a = UI_SCREENSHOT; 691 *subtype_a = UI_SCREENSHOT;
692 } else if (!strcmp(target + 3, "record_video")) {
693 *subtype_a = UI_RECORD_VIDEO;
681 } else if (!strcmp(target + 3, "vgm_log")) { 694 } else if (!strcmp(target + 3, "vgm_log")) {
682 *subtype_a = UI_VGM_LOG; 695 *subtype_a = UI_VGM_LOG;
683 } else if(!strcmp(target + 3, "exit")) { 696 } else if(!strcmp(target + 3, "exit")) {
684 *subtype_a = UI_EXIT; 697 *subtype_a = UI_EXIT;
685 } else if (!strcmp(target + 3, "plane_debug")) { 698 } else if (!strcmp(target + 3, "plane_debug")) {