OSDN Git Service

[MOVIE_SAVER][UI][Qt] Move record movie to menu->screen.
[csp-qt/common_source_project-fm7.git] / source / src / config.h
1 /*
2         Skelton for retropc emulator
3
4         Author : Takeda.Toshiya
5         Date   : 2006.08.18 -
6
7         [ config ]
8 */
9
10 #ifndef _CONFIG_H_
11 #define _CONFIG_H_
12
13 #include "vm/vm.h"
14 #include "fileio.h"
15
16 #define MAX_HISTORY     8
17
18 #if defined(USE_CART2)
19 #define MAX_CART        2
20 #elif defined(USE_CART1)
21 #define MAX_CART        1
22 #endif
23
24 #if defined(USE_FD8)
25 #define MAX_FD          8
26 #elif defined(USE_FD7)
27 #define MAX_FD          7
28 #elif defined(USE_FD6)
29 #define MAX_FD          6
30 #elif defined(USE_FD5)
31 #define MAX_FD          5
32 #elif defined(USE_FD4)
33 #define MAX_FD          4
34 #elif defined(USE_FD3)
35 #define MAX_FD          3
36 #elif defined(USE_FD2)
37 #define MAX_FD          2
38 #elif defined(USE_FD1)
39 #define MAX_FD          1
40 #endif
41
42 #if defined(USE_QD2)
43 #define MAX_QD          2
44 #elif defined(USE_QD1)
45 #define MAX_QD          1
46 #endif
47
48 #if defined(USE_BINARY_FILE2)
49 #define MAX_BINARY      2
50 #elif defined(USE_BINARY_FILE1)
51 #define MAX_BINARY      1
52 #endif
53
54 void initialize_config();
55 void load_config(const _TCHAR* config_path);
56 void save_config(const _TCHAR* config_path);
57 void save_config_state(void *f);
58 bool load_config_state(void *f);
59
60
61 /*
62  * 20160407 Ohta:
63  * Qt:
64  *  To reduce time to build, compiling common blocks of GUI at once.
65  *  So, you should not separate items with #ifdef.
66  */ 
67 typedef struct {
68         // control
69         int boot_mode;
70         int cpu_type;
71         int cpu_power;
72         uint32_t dipswitch;
73         int device_type;
74         int drive_type;
75         bool correct_disk_timing[16];
76         bool ignore_disk_crc[16];
77         bool tape_sound;
78         bool wave_shaper;
79         bool direct_load_mzt;
80         bool baud_high;
81         // recent files
82         _TCHAR initial_cart_dir[_MAX_PATH];
83         _TCHAR recent_cart_path[8][MAX_HISTORY][_MAX_PATH];
84         _TCHAR initial_floppy_disk_dir[_MAX_PATH];
85         _TCHAR recent_floppy_disk_path[16][MAX_HISTORY][_MAX_PATH];
86         _TCHAR initial_quick_disk_dir[_MAX_PATH];
87         _TCHAR recent_quick_disk_path[8][MAX_HISTORY][_MAX_PATH];
88         _TCHAR initial_tape_dir[_MAX_PATH];
89         _TCHAR recent_tape_path[MAX_HISTORY][_MAX_PATH];
90         _TCHAR initial_compact_disc_dir[_MAX_PATH];
91         _TCHAR recent_compact_disc_path[MAX_HISTORY][_MAX_PATH];
92         _TCHAR initial_laser_disc_dir[_MAX_PATH];
93         _TCHAR recent_laser_disc_path[MAX_HISTORY][_MAX_PATH];
94         _TCHAR initial_binary_dir[_MAX_PATH];
95         _TCHAR recent_binary_path[8][MAX_HISTORY][_MAX_PATH];
96         _TCHAR initial_bubble_casette_dir[_MAX_PATH];
97         _TCHAR recent_bubble_casette_path[16][MAX_HISTORY][_MAX_PATH];
98         // screen
99         int window_mode;
100 #ifdef _WIN32
101         bool use_d3d9;
102         bool wait_vsync;
103 #endif
104         int window_stretch_type;
105         int fullscreen_stretch_type;
106         int monitor_type;
107         bool crt_filter;
108         bool scan_line;
109         int rotate_type;
110 #ifdef _USE_QT
111         bool use_opengl_scanline;
112         bool opengl_scanline_vert;
113         bool opengl_scanline_horiz;
114         bool use_opengl_filters;
115         int opengl_filter_num;
116
117         bool swap_kanji_pause;
118 #endif  
119         
120         // sound
121         int sound_frequency;
122         int sound_latency;
123         
124         int general_sound_level;
125         int sound_device_type;
126         int sound_volume_l[32];
127         int sound_volume_r[32];
128         _TCHAR fmgen_dll_path[_MAX_PATH];
129         
130         // input
131 #ifdef _WIN32
132         bool use_direct_input;
133         bool disable_dwm;
134 #endif
135         int keyboard_type;
136         int joy_buttons[4][16];
137 #ifdef _USE_QT
138         _TCHAR assigned_joystick_name[16][256];
139
140         int video_width;
141         int video_height;
142         int video_bitrate;
143         int video_bframes;
144         int video_b_adapt;
145         int video_minq;
146         int video_maxq;
147         int video_subme;
148         int video_threads;
149         int audio_bitrate;
150         int video_frame_rate; // FPS * 1000.0
151 #endif  
152         // printer
153         int printer_device_type;
154         _TCHAR printer_dll_path[_MAX_PATH];
155 } config_t;
156
157 extern config_t config;
158
159 #if defined(_USE_AGAR) || defined(_USE_QT)
160 # include <string>
161 #endif
162
163 #endif
164