1 #include "include/dialogs.h"
2 #include "include/usbld.h"
3 #include "include/dia.h"
4 #include "include/lang.h"
5 #include "include/gui.h"
9 // Dialog definition for IP configuration
10 struct UIItem diaIPConfig
[] = {
11 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_IPCONFIG
}}},
15 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"- PS2 -", -1}}}, {UI_BREAK
},
17 // ---- IP address ----
18 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_IP
}}}, {UI_SPACER
},
20 {UI_INT
, 2, 1, -1, 0, 0, {.intvalue
= {192, 192, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
21 {UI_INT
, 3, 1, -1, 0, 0, {.intvalue
= {168, 168, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
22 {UI_INT
, 4, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
23 {UI_INT
, 5, 1, -1, 0, 0, {.intvalue
= {10, 10, 0, 255}}}, {UI_BREAK
},
26 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_MASK
}}}, {UI_SPACER
},
28 {UI_INT
, 6, 1, -1, 0, 0, {.intvalue
= {255, 255, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
29 {UI_INT
, 7, 1, -1, 0, 0, {.intvalue
= {255, 255, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
30 {UI_INT
, 8, 1, -1, 0, 0, {.intvalue
= {255, 255, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
31 {UI_INT
, 9, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_BREAK
},
34 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_GATEWAY
}}}, {UI_SPACER
},
36 {UI_INT
, 10, 1, -1, 0, 0, {.intvalue
= {192, 192, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
37 {UI_INT
, 11, 1, -1, 0, 0, {.intvalue
= {168, 168, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
38 {UI_INT
, 12, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
39 {UI_INT
, 13, 1, -1, 0, 0, {.intvalue
= {1, 1, 0, 255}}},
44 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"- PC -", -1}}}, {UI_BREAK
},
46 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_IP
}}}, {UI_SPACER
},
48 {UI_INT
, 14, 1, -1, 0, 0, {.intvalue
= {192, 192, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
49 {UI_INT
, 15, 1, -1, 0, 0, {.intvalue
= {168, 168, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
50 {UI_INT
, 16, 1, -1, 0, 0, {.intvalue
= {0, 0, 0, 255}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {".", -1}}},
51 {UI_INT
, 17, 1, -1, 0, 0, {.intvalue
= {1, 1, 0, 255}}}, {UI_BREAK
},
53 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_PORT
}}}, {UI_SPACER
}, {UI_INT
, 18, 1, -1, 0, 0, {.intvalue
= {445, 445, 0, 1024}}}, {UI_BREAK
},
57 // ---- PC share name ----
58 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_SHARE
}}}, {UI_SPACER
}, {UI_STRING
, 19, 1, -1, 0, 0, {.stringvalue
= {"PS2SMB", "PS2SMB", NULL
}}}, {UI_BREAK
},
59 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_USER
}}}, {UI_SPACER
}, {UI_STRING
, 20, 1, -1, 0, 0, {.stringvalue
= {"GUEST", "GUEST", NULL
}}}, {UI_BREAK
},
60 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_PASSWORD
}}}, {UI_SPACER
}, {UI_PASSWORD
, 21, 1, _STR_HINT_GUEST
, 0, 0, {.stringvalue
= {"", "", NULL
}}},
65 {UI_OK
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_OK
}}},
71 struct UIItem diaCompatConfig
[] = {
72 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_COMPAT_SETTINGS
}}}, {UI_SPACER
},
73 {UI_LABEL
, COMPAT_GAME
, 1, -1, 0, 0, {.label
= {"<Game Label>", -1}}},
77 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 1", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
, 1, _STR_HINT_MODE1
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
78 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 2", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 1, 1, _STR_HINT_MODE2
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
79 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 3", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 2, 1, _STR_HINT_MODE3
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
80 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 4", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 3, 1, _STR_HINT_MODE4
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
81 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 5", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 4, 1, _STR_HINT_MODE5
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
82 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 6", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 5, 1, _STR_HINT_MODE6
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
83 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 7", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 6, 1, _STR_HINT_MODE7
, -10, 0, {.intvalue
= {0, 0}}}, {UI_SPACER
},
84 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Mode 8", -1}}}, {UI_SPACER
}, {UI_BOOL
, COMPAT_MODE_BASE
+ 7, 1, _STR_HINT_MODE8
, -10, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
88 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"DMA Mode", -1}}}, {UI_SPACER
}, {UI_ENUM
, COMPAT_MODE_BASE
+ COMPAT_MODE_COUNT
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
93 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"VMC Slot 1", -1}}}, {UI_SPACER
},
95 {UI_BUTTON
, COMPAT_VMC1_DEFINE
, 1, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_SPACER
}, {UI_BUTTON
, COMPAT_VMC1_ACTION
, 1, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_BREAK
},
97 {UI_BUTTON
, COMPAT_VMC1_DEFINE
, 0, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_BREAK
},
99 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"VMC Slot 2", -1}}}, {UI_SPACER
},
101 {UI_BUTTON
, COMPAT_VMC2_DEFINE
, 1, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_SPACER
}, {UI_BUTTON
, COMPAT_VMC2_ACTION
, 1, -1, 0, 0, {.label
= {NULL
, -1}}},
103 {UI_BUTTON
, COMPAT_VMC2_DEFINE
, 0, -1, 0, 0, {.label
= {NULL
, -1}}},
109 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"Game ID", -1}}}, {UI_SPACER
}, {UI_STRING
, COMPAT_GAMEID
, 1, -1, 0, 0, {.stringvalue
= {"", "", NULL
}}},
110 {UI_SPACER
}, {UI_BUTTON
, COMPAT_LOADFROMDISC
, 1, -1, 0, 0, {.label
= {NULL
, _STR_LOAD_FROM_DISC
}}},
114 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_ALTSTARTUP
}}}, {UI_SPACER
}, {UI_STRING
, COMPAT_ALTSTARTUP
, 1, -1, 0, 0, {.stringvalue
= {"", "", &guiAltStartupNameHandler
}}},
119 {UI_BUTTON
, COMPAT_SAVE
, 1, -1, 0, 0, {.label
= {NULL
, _STR_SAVE_CHANGES
}}}, {UI_SPACER
},
121 {UI_BUTTON
, COMPAT_TEST
, 1, -1, 0, 0, {.label
= {NULL
, _STR_TEST
}}}, {UI_BREAK
},
126 {UI_BUTTON
, COMPAT_REMOVE
, 1, -1, 0, 0, {.label
= {NULL
, _STR_REMOVE_ALL_SETTINGS
}}},
132 struct UIItem diaConfig
[] = {
133 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_SETTINGS
}}},
136 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DEBUG
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_DEBUG
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
137 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_EXITTO
}}}, {UI_SPACER
}, {UI_STRING
, CFG_EXITTO
, 1, _STR_HINT_EXITPATH
, 0, 0, {.stringvalue
= {"", "", NULL
}}}, {UI_BREAK
},
138 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DANDROP
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_DANDROP
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
139 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_LASTPLAYED
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_LASTPLAYED
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
143 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_CHECKUSBFRAG
}}}, {UI_SPACER
}, {UI_BOOL
, CFG_CHECKUSBFRAG
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
144 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_USB_DELAY
}}}, {UI_SPACER
}, {UI_INT
, CFG_USBDELAY
, 1, -1, 0, 0, {.intvalue
= {3, 3, 0, 99}}}, {UI_BREAK
},
145 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_USB_PREFIX
}}}, {UI_SPACER
}, {UI_STRING
, CFG_USBPREFIX
, 1, -1, 0, 0, {.stringvalue
= {"", "", NULL
}}}, {UI_BREAK
},
149 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_HDD_SPINDOWN
}}}, {UI_SPACER
}, {UI_INT
, CFG_HDDSPINDOWN
, 1, _STR_HINT_SPINDOWN
, 0, 0, {.intvalue
= {20, 20, 0, 20}}},
153 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_USBMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_USBMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
154 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_HDDMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_HDDMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
155 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_ETHMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_ETHMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
156 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_APPMODE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_APPMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
157 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DEFDEVICE
}}}, {UI_SPACER
}, {UI_ENUM
, CFG_DEFDEVICE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
161 {UI_OK
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_OK
}}},
167 struct UIItem diaUIConfig
[] = {
168 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_GFX_SETTINGS
}}},
172 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_THEME
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_THEME
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
173 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_LANGUAGE
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_LANG
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
174 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_SCROLLING
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_SCROLL
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
175 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_AUTOSORT
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_AUTOSORT
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
176 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_AUTOREFRESH
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_AUTOREFRESH
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
177 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_COVERART
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_COVERART
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
178 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_USE_INFO_SCREEN
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_INFOPAGE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
182 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_TXTCOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_TXTCOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #32
184 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_SELCOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_SELCOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #36
186 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_UICOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_UICOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #40
188 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_BGCOLOR
}}}, {UI_SPACER
}, {UI_COLOUR
, UICFG_BGCOL
, 1, -1, -10, 17, {.colourvalue
= {0, 0}}}, // UIItem #44
193 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_VMODE
}}}, {UI_SPACER
}, {UI_ENUM
, UICFG_VMODE
, 1, -1, 0, 0, {.intvalue
= {0, 0}}}, {UI_BREAK
},
194 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {"V-Sync", -1}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_VSYNC
, 1, -1, 0, 0, {.intvalue
= {1, 1}}}, {UI_BREAK
},
195 {UI_LABEL
, 0, 1, -1, -20, 0, {.label
= {NULL
, _STR_WIDE_SCREEN
}}}, {UI_SPACER
}, {UI_BOOL
, UICFG_WIDESCREEN
, 1, -1, 0, 0, {.intvalue
= {0, 0}}},
199 {UI_OK
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_OK
}}},
205 struct UIItem diaAbout
[] = {
206 {UI_LABEL
, 1, 1, -1, 0, 0, {.label
= {NULL
, -1}}},
210 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_DEVS
}}}, {UI_BREAK
},
214 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"crazyc", -1}}}, {UI_BREAK
},
215 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"ifcaro", -1}}}, {UI_BREAK
},
216 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"izdubar", -1}}}, {UI_BREAK
},
217 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"jimmikaelkael", -1}}}, {UI_BREAK
},
218 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"Polo35", -1}}}, {UI_BREAK
},
219 {UI_SPACER
}, {UI_LABEL
, 0, 1, -1, 0, 15, {.label
= {"volca", -1}}}, {UI_BREAK
},
223 {UI_OK
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_OK
}}},
230 struct UIItem diaVMC
[] = {
231 {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {NULL
, _STR_VMC_SCREEN
}}},
235 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_NAME
}}}, {UI_SPACER
}, {UI_STRING
, VMC_NAME
, 1, -1, 0, 0, {.stringvalue
= {"", "", &guiVmcNameHandler
}}}, {UI_BREAK
},
236 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_SIZE
}}}, {UI_SPACER
}, {UI_ENUM
, VMC_SIZE
, 1, _STR_HINT_VMC_SIZE
, 0, 0, {.intvalue
= {0, 0}}},
240 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_STATUS
}}}, {UI_SPACER
}, {UI_LABEL
, VMC_STATUS
, 0, -1, 0, 0, {.label
= {NULL
, -1}}}, {UI_BREAK
},
241 {UI_LABEL
, 0, 1, -1, -15, 0, {.label
= {NULL
, _STR_VMC_PROGRESS
}}}, {UI_SPACER
}, {UI_INT
, VMC_PROGRESS
, 0, -1, 0, 0, {.intvalue
= {0, 0, 0, 100}}}, {UI_LABEL
, 0, 1, -1, 0, 0, {.label
= {"%", -1}}},
245 {UI_BUTTON
, VMC_BUTTON_CREATE
, 1, -1, 0, 0, {.label
= {NULL
, -1}}},
247 {UI_SPLITTER
}, // UIItem #20
249 {UI_BUTTON
, VMC_BUTTON_DELETE
, 1, -1, 0, 0, {.label
= {NULL
, _STR_DELETE
}}},