Mercurial > repos > blastem
annotate render.h @ 2231:8e6fb2c06024
Fix CDC transfer regression
author | Michael Pavone <pavone@retrodev.com> |
---|---|
date | Thu, 08 Sep 2022 18:56:34 -0700 |
parents | f11f4399d64b |
children | 6a07b13894f7 |
rev | line source |
---|---|
467
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
444
diff
changeset
|
1 /* |
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
444
diff
changeset
|
2 Copyright 2013 Michael Pavone |
487
c08a4efeee7f
Update opengl branch from default. Fix build breakage unrelated to merge
Mike Pavone <pavone@retrodev.com>
diff
changeset
|
3 This file is part of BlastEm. |
467
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
444
diff
changeset
|
4 BlastEm is free software distributed under the terms of the GNU General Public License version 3 or greater. See COPYING for full license text. |
140af5509ce7
Added copyright notice to source files and added GPL license text in COPYING
Mike Pavone <pavone@retrodev.com>
parents:
444
diff
changeset
|
5 */ |
398
c26e48a93fa3
Make keybindings data driven so they can be populated from a config file later
Mike Pavone <pavone@retrodev.com>
parents:
364
diff
changeset
|
6 #ifndef RENDER_H_ |
c26e48a93fa3
Make keybindings data driven so they can be populated from a config file later
Mike Pavone <pavone@retrodev.com>
parents:
364
diff
changeset
|
7 #define RENDER_H_ |
20
f664eeb55cb4
Mostly broken VDP core and savestate viewer
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 |
1986 | 9 #include <stdint.h> |
10 | |
1688
395f684c5379
Fixed the most glaring issues in libretro build
Mike Pavone <pavone@retrodev.com>
parents:
1649
diff
changeset
|
11 #ifndef IS_LIB |
1779
3a8c4ee68568
Added raw fbdev/evdev/ALSA render backend
Michael Pavone <pavone@retrodev.com>
parents:
1688
diff
changeset
|
12 #ifdef USE_FBDEV |
3a8c4ee68568
Added raw fbdev/evdev/ALSA render backend
Michael Pavone <pavone@retrodev.com>
parents:
1688
diff
changeset
|
13 #include "special_keys_evdev.h" |
3a8c4ee68568
Added raw fbdev/evdev/ALSA render backend
Michael Pavone <pavone@retrodev.com>
parents:
1688
diff
changeset
|
14 #define render_relative_mouse(V) |
3a8c4ee68568
Added raw fbdev/evdev/ALSA render backend
Michael Pavone <pavone@retrodev.com>
parents:
1688
diff
changeset
|
15 #else |
741
80a67be1770b
Initial work on Windows port
Michael Pavone <pavone@retrodev.com>
parents:
504
diff
changeset
|
16 #include <SDL.h> |
1035
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
17 #define RENDERKEY_UP SDLK_UP |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
18 #define RENDERKEY_DOWN SDLK_DOWN |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
19 #define RENDERKEY_LEFT SDLK_LEFT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
20 #define RENDERKEY_RIGHT SDLK_RIGHT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
21 #define RENDERKEY_ESC SDLK_ESCAPE |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
22 #define RENDERKEY_DEL SDLK_DELETE |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
23 #define RENDERKEY_LSHIFT SDLK_LSHIFT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
24 #define RENDERKEY_RSHIFT SDLK_RSHIFT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
25 #define RENDERKEY_LCTRL SDLK_LCTRL |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
26 #define RENDERKEY_RCTRL SDLK_RCTRL |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
27 #define RENDERKEY_LALT SDLK_LALT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
28 #define RENDERKEY_RALT SDLK_RALT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
29 #define RENDERKEY_HOME SDLK_HOME |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
30 #define RENDERKEY_END SDLK_END |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
31 #define RENDERKEY_PAGEUP SDLK_PAGEUP |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
32 #define RENDERKEY_PAGEDOWN SDLK_PAGEDOWN |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
33 #define RENDERKEY_F1 SDLK_F1 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
34 #define RENDERKEY_F2 SDLK_F2 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
35 #define RENDERKEY_F3 SDLK_F3 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
36 #define RENDERKEY_F4 SDLK_F4 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
37 #define RENDERKEY_F5 SDLK_F5 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
38 #define RENDERKEY_F6 SDLK_F6 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
39 #define RENDERKEY_F7 SDLK_F7 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
40 #define RENDERKEY_F8 SDLK_F8 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
41 #define RENDERKEY_F9 SDLK_F9 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
42 #define RENDERKEY_F10 SDLK_F10 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
43 #define RENDERKEY_F11 SDLK_F11 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
44 #define RENDERKEY_F12 SDLK_F12 |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
45 #define RENDERKEY_SELECT SDLK_SELECT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
46 #define RENDERKEY_PLAY SDLK_AUDIOPLAY |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
47 #define RENDERKEY_SEARCH SDLK_AC_SEARCH |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
48 #define RENDERKEY_BACK SDLK_AC_BACK |
1549
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
49 #define RENDERKEY_NP0 SDLK_KP_0 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
50 #define RENDERKEY_NP1 SDLK_KP_1 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
51 #define RENDERKEY_NP2 SDLK_KP_2 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
52 #define RENDERKEY_NP3 SDLK_KP_3 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
53 #define RENDERKEY_NP4 SDLK_KP_4 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
54 #define RENDERKEY_NP5 SDLK_KP_5 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
55 #define RENDERKEY_NP6 SDLK_KP_6 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
56 #define RENDERKEY_NP7 SDLK_KP_7 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
57 #define RENDERKEY_NP8 SDLK_KP_8 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
58 #define RENDERKEY_NP9 SDLK_KP_9 |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
59 #define RENDERKEY_NP_DIV SDLK_KP_DIVIDE |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
60 #define RENDERKEY_NP_MUL SDLK_KP_MULTIPLY |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
61 #define RENDERKEY_NP_MIN SDLK_KP_MINUS |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
62 #define RENDERKEY_NP_PLUS SDLK_KP_PLUS |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
63 #define RENDERKEY_NP_ENTER SDLK_KP_ENTER |
577253765192
Allow numpad keys to be mapped
Michael Pavone <pavone@retrodev.com>
parents:
1483
diff
changeset
|
64 #define RENDERKEY_NP_STOP SDLK_KP_PERIOD |
1035
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
65 #define RENDER_DPAD_UP SDL_HAT_UP |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
66 #define RENDER_DPAD_DOWN SDL_HAT_DOWN |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
67 #define RENDER_DPAD_LEFT SDL_HAT_LEFT |
284d905ca582
Added support for binding a bunch more "special" keys
Michael Pavone <pavone@retrodev.com>
parents:
937
diff
changeset
|
68 #define RENDER_DPAD_RIGHT SDL_HAT_RIGHT |
915
9e882eca717e
Initial support for relative mouse mode and skeleton of support for capture mode. Avoid mouse position overflow in absolute mode. Allow absolute mode to be set by ROM DB.
Michael Pavone <pavone@retrodev.com>
parents:
914
diff
changeset
|
69 #define render_relative_mouse SDL_SetRelativeMouseMode |
1967
bd70f1e15684
Make netplay remote sync to network rather than audio or video so it doesn't drift out of sync with the host
Michael Pavone <pavone@retrodev.com>
parents:
1946
diff
changeset
|
70 typedef SDL_Thread* render_thread; |
1688
395f684c5379
Fixed the most glaring issues in libretro build
Mike Pavone <pavone@retrodev.com>
parents:
1649
diff
changeset
|
71 #endif |
1779
3a8c4ee68568
Added raw fbdev/evdev/ALSA render backend
Michael Pavone <pavone@retrodev.com>
parents:
1688
diff
changeset
|
72 #endif |
741
80a67be1770b
Initial work on Windows port
Michael Pavone <pavone@retrodev.com>
parents:
504
diff
changeset
|
73 |
80a67be1770b
Initial work on Windows port
Michael Pavone <pavone@retrodev.com>
parents:
504
diff
changeset
|
74 #define MAX_JOYSTICKS 8 |
897
b9564fb88a5a
WIP support for mega mouse
Michael Pavone <pavone@retrodev.com>
parents:
884
diff
changeset
|
75 #define MAX_MICE 8 |
907
b5d35222047e
Mega mouse support is mostly done
Michael Pavone <pavone@retrodev.com>
parents:
903
diff
changeset
|
76 #define MAX_MOUSE_BUTTONS 8 |
741
80a67be1770b
Initial work on Windows port
Michael Pavone <pavone@retrodev.com>
parents:
504
diff
changeset
|
77 |
1077
1a66d5165ea7
Cleanup the separation of render backend and VDP code in preparation for having extra debug windows. Make determination of H40/H32 based on number of lines in each mode.
Michael Pavone <pavone@retrodev.com>
parents:
1035
diff
changeset
|
78 #define FRAMEBUFFER_ODD 0 |
1a66d5165ea7
Cleanup the separation of render backend and VDP code in preparation for having extra debug windows. Make determination of H40/H32 based on number of lines in each mode.
Michael Pavone <pavone@retrodev.com>
parents:
1035
diff
changeset
|
79 #define FRAMEBUFFER_EVEN 1 |
1825
56a1171e29b9
Allow Nuklear UI to be used when OpenGL is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1804
diff
changeset
|
80 #define FRAMEBUFFER_UI 2 |
56a1171e29b9
Allow Nuklear UI to be used when OpenGL is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1804
diff
changeset
|
81 #define FRAMEBUFFER_USER_START 3 |
1077
1a66d5165ea7
Cleanup the separation of render backend and VDP code in preparation for having extra debug windows. Make determination of H40/H32 based on number of lines in each mode.
Michael Pavone <pavone@retrodev.com>
parents:
1035
diff
changeset
|
82 |
1184
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
1117
diff
changeset
|
83 typedef enum { |
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
1117
diff
changeset
|
84 VID_NTSC, |
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
1117
diff
changeset
|
85 VID_PAL, |
2200
f11f4399d64b
Crop display in game gear mode
Michael Pavone <pavone@retrodev.com>
parents:
2018
diff
changeset
|
86 VID_GAMEGEAR, |
1184
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
1117
diff
changeset
|
87 NUM_VID_STD |
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
1117
diff
changeset
|
88 } vid_std; |
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
1117
diff
changeset
|
89 |
1187
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
90 #define RENDER_DPAD_BIT 0x40000000 |
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
91 #define RENDER_AXIS_BIT 0x20000000 |
1804
34370330eaf3
Support controllers that have their dpad mapped to an axis
Michael Pavone <pavone@retrodev.com>
parents:
1796
diff
changeset
|
92 #define RENDER_AXIS_POS 0x10000000 |
1187
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
93 #define RENDER_INVALID_NAME -1 |
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
94 #define RENDER_NOT_MAPPED -2 |
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
95 #define RENDER_NOT_PLUGGED_IN -3 |
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
96 |
1397
89eb967fed72
Initial support for drag and drop. Some work needed for proper menu integration.
Michael Pavone <pavone@retrodev.com>
parents:
1263
diff
changeset
|
97 typedef void (*drop_handler)(const char *filename); |
1649
b500e971da75
Allow closing VDP debug windows with the close button in the window title bar
Michael Pavone <pavone@retrodev.com>
parents:
1642
diff
changeset
|
98 typedef void (*window_close_handler)(uint8_t which); |
1825
56a1171e29b9
Allow Nuklear UI to be used when OpenGL is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1804
diff
changeset
|
99 typedef void (*ui_render_fun)(void); |
1967
bd70f1e15684
Make netplay remote sync to network rather than audio or video so it doesn't drift out of sync with the host
Michael Pavone <pavone@retrodev.com>
parents:
1946
diff
changeset
|
100 typedef int (*render_thread_fun)(void*); |
1397
89eb967fed72
Initial support for drag and drop. Some work needed for proper menu integration.
Michael Pavone <pavone@retrodev.com>
parents:
1263
diff
changeset
|
101 |
426
add9e2f5c0e3
Make VDP render in native pixel format of the renderer for a modest performance gain and to make it easier to use OpenGL for rendering
Mike Pavone <pavone@retrodev.com>
parents:
418
diff
changeset
|
102 uint32_t render_map_color(uint8_t r, uint8_t g, uint8_t b); |
1263
5f65a16c23ff
Implement raw screenshot functionality requested in ticket:10
Michael Pavone <pavone@retrodev.com>
parents:
1207
diff
changeset
|
103 void render_save_screenshot(char *path); |
1649
b500e971da75
Allow closing VDP debug windows with the close button in the window title bar
Michael Pavone <pavone@retrodev.com>
parents:
1642
diff
changeset
|
104 uint8_t render_create_window(char *caption, uint32_t width, uint32_t height, window_close_handler close_handler); |
1642
c6b2c0f8cc61
Implemented support for toggling off a debug view
Michael Pavone <pavone@retrodev.com>
parents:
1631
diff
changeset
|
105 void render_destroy_window(uint8_t which); |
1077
1a66d5165ea7
Cleanup the separation of render backend and VDP code in preparation for having extra debug windows. Make determination of H40/H32 based on number of lines in each mode.
Michael Pavone <pavone@retrodev.com>
parents:
1035
diff
changeset
|
106 uint32_t *render_get_framebuffer(uint8_t which, int *pitch); |
1a66d5165ea7
Cleanup the separation of render backend and VDP code in preparation for having extra debug windows. Make determination of H40/H32 based on number of lines in each mode.
Michael Pavone <pavone@retrodev.com>
parents:
1035
diff
changeset
|
107 void render_framebuffer_updated(uint8_t which, int width); |
1631
c4ba3177b72d
WIP new VDP plane debug view and support for detached VDP debug views generally
Michael Pavone <pavone@retrodev.com>
parents:
1608
diff
changeset
|
108 //returns the framebuffer index associated with the Window that has focus |
c4ba3177b72d
WIP new VDP plane debug view and support for detached VDP debug views generally
Michael Pavone <pavone@retrodev.com>
parents:
1608
diff
changeset
|
109 uint8_t render_get_active_framebuffer(void); |
1103
22e87b739ad6
WIP split of ROM loading/argument parsing from Genesis emulation code. Compiles and doesn't crash, but nothing works. Still a few too many globals as well.
Michael Pavone <pavone@retrodev.com>
parents:
1102
diff
changeset
|
110 void render_init(int width, int height, char * title, uint8_t fullscreen); |
1184
b1147418254a
Overscan is now configurable
Michael Pavone <pavone@retrodev.com>
parents:
1117
diff
changeset
|
111 void render_set_video_standard(vid_std std); |
1202
a6ae693974e0
Allow toggling full screen mode at runtime. Allow resizing the window in windowed mode. Allow specifying the aspect ratio in the config file.
Michael Pavone <pavone@retrodev.com>
parents:
1187
diff
changeset
|
112 void render_toggle_fullscreen(); |
874
b6842dfb8edf
ROM is now run after being selected in menu. Initial path for menu is read from config file.
Michael Pavone <pavone@retrodev.com>
parents:
792
diff
changeset
|
113 void render_update_caption(char *title); |
1865
4c322abd9fa5
Split generic part of audio code into a separate file so it can be used in other targets besides SDL
Michael Pavone <pavone@retrodev.com>
parents:
1825
diff
changeset
|
114 void render_wait_quit(void); |
409
c1bddeadc566
Process events in vgm player so that quitting works
Mike Pavone <pavone@retrodev.com>
parents:
398
diff
changeset
|
115 void process_events(); |
914
28ec32e720b2
Scale mouse data based on window size
Michael Pavone <pavone@retrodev.com>
parents:
907
diff
changeset
|
116 int render_width(); |
28ec32e720b2
Scale mouse data based on window size
Michael Pavone <pavone@retrodev.com>
parents:
907
diff
changeset
|
117 int render_height(); |
915
9e882eca717e
Initial support for relative mouse mode and skeleton of support for capture mode. Avoid mouse position overflow in absolute mode. Allow absolute mode to be set by ROM DB.
Michael Pavone <pavone@retrodev.com>
parents:
914
diff
changeset
|
118 int render_fullscreen(); |
1397
89eb967fed72
Initial support for drag and drop. Some work needed for proper menu integration.
Michael Pavone <pavone@retrodev.com>
parents:
1263
diff
changeset
|
119 void render_set_drag_drop_handler(drop_handler handler); |
723
7178d750efbd
Process events while waiting for 68K debugger input. This prevents "not responsive" dialogs when sitting in the debugger
Michael Pavone <pavone@retrodev.com>
parents:
719
diff
changeset
|
120 void process_events(); |
1207
9d6f155732ed
Basic support for mapping an analog axis to functionality
Michael Pavone <pavone@retrodev.com>
parents:
1202
diff
changeset
|
121 int32_t render_translate_input_name(int32_t controller, char *name, uint8_t is_axis); |
1187
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
122 int32_t render_dpad_part(int32_t input); |
1207
9d6f155732ed
Basic support for mapping an analog axis to functionality
Michael Pavone <pavone@retrodev.com>
parents:
1202
diff
changeset
|
123 int32_t render_axis_part(int32_t input); |
1187
6a4503fad67e
Initial support for using SDL2 game controller mapping functionality
Michael Pavone <pavone@retrodev.com>
parents:
1184
diff
changeset
|
124 uint8_t render_direction_part(int32_t input); |
1608
419a0a133b5c
Allow a gamepad mapping to apply to all controllers, controllers of a particular type (i.e.e 6-button PS4 controllers) or specific controllers (based on SDL2 GUID) in addition to the controller in a certain slot
Michael Pavone <pavone@retrodev.com>
parents:
1573
diff
changeset
|
125 char* render_joystick_type_id(int index); |
792
724bbec47f86
Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows).
Michael Pavone <pavone@retrodev.com>
parents:
744
diff
changeset
|
126 void render_errorbox(char *title, char *message); |
724bbec47f86
Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows).
Michael Pavone <pavone@retrodev.com>
parents:
744
diff
changeset
|
127 void render_warnbox(char *title, char *message); |
724bbec47f86
Use a new fatal_error function instead of calling fprintf and exit for fatal errors. This new function more gracefully handles the case in which BlastEm was not started from a terminal or disconnected from ther terminal (Windows).
Michael Pavone <pavone@retrodev.com>
parents:
744
diff
changeset
|
128 void render_infobox(char *title, char *message); |
1398
08116cb5ffaa
Fix absolute mouse mode when non-default overscan settings are used
Michael Pavone <pavone@retrodev.com>
parents:
1397
diff
changeset
|
129 uint32_t render_emulated_width(); |
08116cb5ffaa
Fix absolute mouse mode when non-default overscan settings are used
Michael Pavone <pavone@retrodev.com>
parents:
1397
diff
changeset
|
130 uint32_t render_emulated_height(); |
08116cb5ffaa
Fix absolute mouse mode when non-default overscan settings are used
Michael Pavone <pavone@retrodev.com>
parents:
1397
diff
changeset
|
131 uint32_t render_overscan_top(); |
1881
55198fc9cc1f
Don't render lines that are cropped by overscan. Allows submitting frame earlier when bottom overscan is non-zero which can reduce latency in some cases
Mike Pavone <pavone@retrodev.com>
parents:
1865
diff
changeset
|
132 uint32_t render_overscan_bot(); |
1398
08116cb5ffaa
Fix absolute mouse mode when non-default overscan settings are used
Michael Pavone <pavone@retrodev.com>
parents:
1397
diff
changeset
|
133 uint32_t render_overscan_left(); |
1482
2d203bf73dbd
Avoid burning a huge amount of CPU in the menu when emulation is not running and vsync is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1398
diff
changeset
|
134 uint32_t render_elapsed_ms(void); |
2d203bf73dbd
Avoid burning a huge amount of CPU in the menu when emulation is not running and vsync is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1398
diff
changeset
|
135 void render_sleep_ms(uint32_t delay); |
1483
001120e91fed
Skip loading menu ROM if Nuklear UI is enabled. Allow disabling Nuklear UI in favor of old menu ROM both at compile time and in config. Fall back to ROM UI if GL is unavailable
Michael Pavone <pavone@retrodev.com>
parents:
1482
diff
changeset
|
136 uint8_t render_has_gl(void); |
1573
a051d8ee4528
Only save config file if something has changed. Re-initialize audio and video with new settings if config has changed
Michael Pavone <pavone@retrodev.com>
parents:
1555
diff
changeset
|
137 void render_config_updated(void); |
1825
56a1171e29b9
Allow Nuklear UI to be used when OpenGL is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1804
diff
changeset
|
138 void render_set_gl_context_handlers(ui_render_fun destroy, ui_render_fun create); |
56a1171e29b9
Allow Nuklear UI to be used when OpenGL is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1804
diff
changeset
|
139 void render_set_ui_render_fun(ui_render_fun); |
56a1171e29b9
Allow Nuklear UI to be used when OpenGL is disabled
Michael Pavone <pavone@retrodev.com>
parents:
1804
diff
changeset
|
140 void render_set_ui_fb_resize_handler(ui_render_fun resize); |
1932
b387f1c5a1d0
WIP new sync mode that runs emulation on audio thread
Michael Pavone <pavone@retrodev.com>
parents:
1881
diff
changeset
|
141 void render_video_loop(void); |
b387f1c5a1d0
WIP new sync mode that runs emulation on audio thread
Michael Pavone <pavone@retrodev.com>
parents:
1881
diff
changeset
|
142 uint8_t render_should_release_on_exit(void); |
1967
bd70f1e15684
Make netplay remote sync to network rather than audio or video so it doesn't drift out of sync with the host
Michael Pavone <pavone@retrodev.com>
parents:
1946
diff
changeset
|
143 void render_set_external_sync(uint8_t ext_sync_on); |
2018
193b804c9845
Add a UI button to reset config to defaults
Michael Pavone <pavone@retrodev.com>
parents:
1986
diff
changeset
|
144 void render_reset_mappings(void); |
1986 | 145 #ifndef IS_LIB |
1967
bd70f1e15684
Make netplay remote sync to network rather than audio or video so it doesn't drift out of sync with the host
Michael Pavone <pavone@retrodev.com>
parents:
1946
diff
changeset
|
146 uint8_t render_create_thread(render_thread *thread, const char *name, render_thread_fun fun, void *data); |
1986 | 147 #endif |
20
f664eeb55cb4
Mostly broken VDP core and savestate viewer
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
148 |
398
c26e48a93fa3
Make keybindings data driven so they can be populated from a config file later
Mike Pavone <pavone@retrodev.com>
parents:
364
diff
changeset
|
149 #endif //RENDER_H_ |
c26e48a93fa3
Make keybindings data driven so they can be populated from a config file later
Mike Pavone <pavone@retrodev.com>
parents:
364
diff
changeset
|
150 |