Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
hrydgard
GitHub Repository: hrydgard/ppsspp
Path: blob/master/libretro/libretro_core_options.h
3185 views
1
#ifndef LIBRETRO_CORE_OPTIONS_H__
2
#define LIBRETRO_CORE_OPTIONS_H__
3
4
#include <stdlib.h>
5
#include <string.h>
6
7
#include "libretro.h"
8
#include "retro_inline.h"
9
10
#ifndef HAVE_NO_LANGEXTRA
11
#include "libretro_core_options_intl.h"
12
#endif
13
14
#define BOOL_OPTIONS \
15
{ \
16
{ "disabled", NULL }, \
17
{ "enabled", NULL }, \
18
{ NULL, NULL }, \
19
}
20
21
#define MAC_ADDRESS_OPTIONS \
22
{ \
23
{ "0", NULL }, \
24
{ "1", NULL }, \
25
{ "2", NULL }, \
26
{ "3", NULL }, \
27
{ "4", NULL }, \
28
{ "5", NULL }, \
29
{ "6", NULL }, \
30
{ "7", NULL }, \
31
{ "8", NULL }, \
32
{ "9", NULL }, \
33
{ "a", NULL }, \
34
{ "b", NULL }, \
35
{ "c", NULL }, \
36
{ "d", NULL }, \
37
{ "e", NULL }, \
38
{ "f", NULL }, \
39
{ NULL, NULL }, \
40
}
41
42
#define IP_ADDRESS_OPTIONS \
43
{ \
44
{ "0", NULL }, \
45
{ "1", NULL }, \
46
{ "2", NULL }, \
47
{ "3", NULL }, \
48
{ "4", NULL }, \
49
{ "5", NULL }, \
50
{ "6", NULL }, \
51
{ "7", NULL }, \
52
{ "8", NULL }, \
53
{ "9", NULL }, \
54
{ NULL, NULL }, \
55
}
56
57
/*
58
********************************
59
* VERSION: 2.0
60
********************************
61
*
62
* - 2.0: Add support for core options v2 interface
63
* - 1.3: Move translations to libretro_core_options_intl.h
64
* - libretro_core_options_intl.h includes BOM and utf-8
65
* fix for MSVC 2010-2013
66
* - Added HAVE_NO_LANGEXTRA flag to disable translations
67
* on platforms/compilers without BOM support
68
* - 1.2: Use core options v1 interface when
69
* RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION is >= 1
70
* (previously required RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION == 1)
71
* - 1.1: Support generation of core options v0 retro_core_option_value
72
* arrays containing options with a single value
73
* - 1.0: First commit
74
*/
75
76
#ifdef __cplusplus
77
extern "C" {
78
#endif
79
80
/*
81
********************************
82
* Core Option Definitions
83
********************************
84
*/
85
86
/* RETRO_LANGUAGE_ENGLISH */
87
88
/* Default language:
89
* - All other languages must include the same keys and values
90
* - Will be used as a fallback in the event that frontend language
91
* is not available
92
* - Will be used as a fallback for any missing entries in
93
* frontend language definition */
94
95
struct retro_core_option_v2_category option_cats_us[] = {
96
{
97
"system",
98
"System",
99
"Configure system options."
100
},
101
{
102
"video",
103
"Video",
104
"Configure video options."
105
},
106
{
107
"input",
108
"Input",
109
"Configure input options."
110
},
111
{
112
"hacks",
113
"Hacks",
114
"Configure speed and emulation hacks. Can cause rendering errors!"
115
},
116
{
117
"network",
118
"Network",
119
"Configure network options."
120
},
121
{ NULL, NULL, NULL },
122
};
123
124
struct retro_core_option_v2_definition option_defs_us[] = {
125
{
126
"ppsspp_cpu_core",
127
"CPU Core",
128
NULL,
129
NULL,
130
NULL,
131
"system",
132
{
133
{ "JIT", "Dynarec (JIT)" },
134
{ "IR JIT", "IR Interpreter" },
135
{ "Interpreter", NULL },
136
{ NULL, NULL },
137
},
138
"JIT"
139
},
140
{
141
"ppsspp_fast_memory",
142
"Fast Memory",
143
NULL,
144
"Unstable.",
145
NULL,
146
"system",
147
BOOL_OPTIONS,
148
"enabled"
149
},
150
{
151
"ppsspp_ignore_bad_memory_access",
152
"Ignore Bad Memory Accesses",
153
NULL,
154
NULL,
155
NULL,
156
"system",
157
BOOL_OPTIONS,
158
"enabled"
159
},
160
{
161
"ppsspp_io_timing_method",
162
"I/O Timing Method",
163
NULL,
164
NULL,
165
NULL,
166
"system",
167
{
168
{ "Fast", NULL },
169
{ "Host", NULL },
170
{ "Simulate UMD delays", NULL },
171
{ NULL, NULL },
172
},
173
"Fast"
174
},
175
{
176
"ppsspp_force_lag_sync",
177
"Force Real Clock Sync",
178
NULL,
179
"Slower, less lag.",
180
NULL,
181
"system",
182
BOOL_OPTIONS,
183
"disabled"
184
},
185
{
186
"ppsspp_locked_cpu_speed",
187
"Locked CPU Speed",
188
NULL,
189
NULL,
190
NULL,
191
"system",
192
{
193
{ "disabled", NULL },
194
{ "222MHz", NULL },
195
{ "266MHz", NULL },
196
{ "333MHz", NULL },
197
{ "366MHz", NULL },
198
{ "399MHz", NULL },
199
{ "432MHz", NULL },
200
{ "444MHz", NULL },
201
{ "466MHz", NULL },
202
{ "499MHz", NULL },
203
{ "532MHz", NULL },
204
{ "555MHz", NULL },
205
{ "566MHz", NULL },
206
{ "599MHz", NULL },
207
{ "632MHz", NULL },
208
{ "666MHz", NULL },
209
{ "777MHz", NULL },
210
{ "888MHz", NULL },
211
{ "999MHz", NULL },
212
{ NULL, NULL },
213
},
214
"disabled"
215
},
216
{
217
"ppsspp_memstick_inserted",
218
"Memory Stick Inserted",
219
NULL,
220
"Some games require ejecting/inserting the Memory Stick.",
221
NULL,
222
"system",
223
BOOL_OPTIONS,
224
"enabled"
225
},
226
{
227
"ppsspp_cache_iso",
228
"Cache Full ISO in RAM",
229
NULL,
230
NULL,
231
NULL,
232
"system",
233
BOOL_OPTIONS,
234
"disabled"
235
},
236
{
237
"ppsspp_cheats",
238
"Internal Cheats Support",
239
NULL,
240
NULL,
241
NULL,
242
"system",
243
BOOL_OPTIONS,
244
"disabled"
245
},
246
{
247
"ppsspp_language",
248
"Game Language",
249
NULL,
250
"'Automatic' will use the frontend language.",
251
NULL,
252
"system",
253
{
254
{ "Automatic", NULL },
255
{ "English", NULL },
256
{ "Japanese", NULL },
257
{ "French", NULL },
258
{ "Spanish", NULL },
259
{ "German", NULL },
260
{ "Italian", NULL },
261
{ "Dutch", NULL },
262
{ "Portuguese", NULL },
263
{ "Russian", NULL },
264
{ "Korean", NULL },
265
{ "Chinese Traditional", NULL },
266
{ "Chinese Simplified", NULL },
267
{ NULL, NULL },
268
},
269
"Automatic"
270
},
271
{
272
"ppsspp_psp_model",
273
"PSP Model",
274
NULL,
275
NULL,
276
NULL,
277
"system",
278
{
279
{ "psp_1000", "PSP-1000" },
280
{ "psp_2000_3000", "PSP-2000/3000" },
281
{ NULL, NULL },
282
},
283
"psp_2000_3000"
284
},
285
{
286
"ppsspp_backend",
287
"Backend",
288
NULL,
289
"'Automatic' will use the frontend video driver. Core restart required.",
290
NULL,
291
"video",
292
{
293
{ "auto", "Automatic" },
294
{ "opengl", "OpenGL" },
295
#ifndef HAVE_LIBNX
296
{ "vulkan", "Vulkan" },
297
#endif
298
#ifdef _WIN32
299
{ "d3d11", "D3D11" },
300
#endif
301
{ "none", "None" },
302
{ NULL, NULL },
303
},
304
"auto"
305
},
306
{
307
"ppsspp_software_rendering",
308
"Software Rendering",
309
NULL,
310
"Slow, accurate. Core restart required.",
311
NULL,
312
"video",
313
BOOL_OPTIONS,
314
"disabled"
315
},
316
{
317
"ppsspp_internal_resolution",
318
"Rendering Resolution",
319
NULL,
320
"Core restart required with Vulkan.",
321
NULL,
322
"video",
323
{
324
{ "480x272", "1x (480x272)" },
325
{ "960x544", "2x (960x544)" },
326
{ "1440x816", "3x (1440x816)" },
327
{ "1920x1088", "4x (1920x1088)" },
328
{ "2400x1360", "5x (2400x1360)" },
329
{ "2880x1632", "6x (2880x1632)" },
330
{ "3360x1904", "7x (3360x1904)" },
331
{ "3840x2176", "8x (3840x2176)" },
332
{ "4320x2448", "9x (4320x2448)" },
333
{ "4800x2720", "10x (4800x2720)" },
334
{ NULL, NULL },
335
},
336
"480x272"
337
},
338
{
339
"ppsspp_mulitsample_level",
340
"MSAA Antialiasing",
341
NULL,
342
"Vulkan only. Core restart required.",
343
NULL,
344
"video",
345
{
346
{"Disabled", NULL},
347
{"x2", NULL},
348
{"x4", NULL},
349
{"x8", NULL},
350
{NULL, NULL}
351
},
352
"Disabled"
353
},
354
{
355
"ppsspp_cropto16x9",
356
"Crop to 16x9",
357
NULL,
358
"Remove one line from top and bottom to get exact 16:9. Core restart required with Vulkan.",
359
NULL,
360
"video",
361
BOOL_OPTIONS,
362
"enabled"
363
},
364
{
365
"ppsspp_frameskip",
366
"Frameskip",
367
NULL,
368
NULL,
369
NULL,
370
"video",
371
{
372
{ "disabled", NULL },
373
{ "1", NULL },
374
{ "2", NULL },
375
{ "3", NULL },
376
{ "4", NULL },
377
{ "5", NULL },
378
{ "6", NULL },
379
{ "7", NULL },
380
{ "8", NULL },
381
{ NULL, NULL },
382
},
383
"disabled"
384
},
385
{
386
"ppsspp_frameskiptype",
387
"Frameskip Type",
388
NULL,
389
NULL,
390
NULL,
391
"video",
392
{
393
{ "Number of frames", NULL },
394
{ "Percent of FPS", NULL },
395
{ NULL, NULL },
396
},
397
"Number of frames"
398
},
399
{
400
"ppsspp_auto_frameskip",
401
"Auto Frameskip",
402
NULL,
403
NULL,
404
NULL,
405
"video",
406
BOOL_OPTIONS,
407
"disabled"
408
},
409
{
410
"ppsspp_frame_duplication",
411
"Render Duplicate Frames to 60 Hz",
412
NULL,
413
"Can make framerate smoother in games that run at lower framerates.",
414
NULL,
415
"video",
416
BOOL_OPTIONS,
417
"enabled"
418
},
419
{
420
"ppsspp_detect_vsync_swap_interval",
421
"Detect Frame Rate Changes",
422
NULL,
423
"Notify frontend.",
424
NULL,
425
"video",
426
BOOL_OPTIONS,
427
"disabled"
428
},
429
{
430
"ppsspp_inflight_frames",
431
"Buffer Graphics Commands",
432
NULL,
433
"GL/Vulkan only, slower, less lag, restart.",
434
NULL,
435
"video",
436
{
437
{ "No buffer", NULL },
438
{ "Up to 1", NULL },
439
{ "Up to 2", NULL },
440
{ NULL, NULL },
441
},
442
"Up to 2"
443
},
444
{
445
"ppsspp_button_preference",
446
"Confirmation Button",
447
NULL,
448
NULL,
449
NULL,
450
"input",
451
{
452
{ "Cross", NULL },
453
{ "Circle", NULL },
454
{ NULL, NULL },
455
},
456
"Cross"
457
},
458
{
459
"ppsspp_analog_is_circular",
460
"Analog Circle vs Square Gate Compensation",
461
NULL,
462
NULL,
463
NULL,
464
"input",
465
BOOL_OPTIONS,
466
"disabled"
467
},
468
{
469
"ppsspp_analog_deadzone",
470
"Analog Deadzone",
471
NULL,
472
"Additional deadzone to apply after frontend input.",
473
NULL,
474
"input",
475
{
476
{ "0.0", "0%" },
477
{ "0.05", "5%" },
478
{ "0.10", "10%" },
479
{ "0.15", "15%" },
480
{ "0.20", "20%" },
481
{ "0.25", "25%" },
482
{ "0.30", "30%" },
483
{ "0.35", "35%" },
484
{ "0.40", "40%" },
485
{ "0.45", "45%" },
486
{ "0.50", "50%" },
487
{ NULL, NULL },
488
},
489
"0.0"
490
},
491
{
492
"ppsspp_analog_sensitivity",
493
"Analog Axis Scale",
494
NULL,
495
"Additional sensitivity factor to apply after frontend input.",
496
NULL,
497
"input",
498
{
499
{"1.00", NULL}, {"1.01", NULL}, {"1.02", NULL}, {"1.03", NULL}, {"1.04", NULL}, {"1.05", NULL}, {"1.06", NULL},
500
{"1.07", NULL}, {"1.08", NULL}, {"1.09", NULL}, {"1.10", NULL}, {"1.11", NULL}, {"1.12", NULL}, {"1.13", NULL},
501
{"1.14", NULL}, {"1.15", NULL}, {"1.16", NULL}, {"1.17", NULL}, {"1.18", NULL}, {"1.19", NULL}, {"1.20", NULL},
502
{"1.21", NULL}, {"1.22", NULL}, {"1.23", NULL}, {"1.24", NULL}, {"1.25", NULL}, {"1.26", NULL}, {"1.27", NULL},
503
{"1.28", NULL}, {"1.29", NULL}, {"1.30", NULL}, {"1.31", NULL}, {"1.32", NULL}, {"1.33", NULL}, {"1.34", NULL},
504
{"1.35", NULL}, {"1.36", NULL}, {"1.37", NULL}, {"1.38", NULL}, {"1.39", NULL}, {"1.40", NULL}, {"1.41", NULL},
505
{"1.42", NULL}, {"1.43", NULL}, {"1.44", NULL}, {"1.45", NULL}, {"1.46", NULL}, {"1.47", NULL}, {"1.48", NULL},
506
{"1.49", NULL}, {"1.50", NULL}, {NULL, NULL},
507
},
508
"1.00"
509
},
510
{
511
"ppsspp_skip_buffer_effects",
512
"Skip Buffer Effects",
513
NULL,
514
"Faster, but nothing may draw in some games.",
515
NULL,
516
"hacks",
517
BOOL_OPTIONS,
518
"disabled"
519
},
520
{
521
"ppsspp_disable_range_culling",
522
"Disable Culling",
523
NULL,
524
"",
525
NULL,
526
"hacks",
527
BOOL_OPTIONS,
528
"disabled"
529
},
530
{
531
"ppsspp_skip_gpu_readbacks",
532
"Skip GPU Readbacks",
533
NULL,
534
"Some games require GPU readbacks, so be careful.",
535
NULL,
536
"hacks",
537
BOOL_OPTIONS,
538
"disabled"
539
},
540
{
541
"ppsspp_lazy_texture_caching",
542
"Lazy Texture Caching (Speedup)",
543
NULL,
544
"Faster, but can cause text problems in a few games.",
545
NULL,
546
"hacks",
547
BOOL_OPTIONS,
548
"disabled"
549
},
550
{
551
"ppsspp_spline_quality",
552
"Spline/Bezier Curves Quality",
553
NULL,
554
"Only used by some games, controls smoothness of curves.",
555
NULL,
556
"hacks",
557
{
558
{ "Low", NULL },
559
{ "Medium", NULL },
560
{ "High", NULL },
561
{ NULL, NULL },
562
},
563
"High"
564
},
565
{
566
"ppsspp_lower_resolution_for_effects",
567
"Lower Resolution for Effects",
568
NULL,
569
"Reduces artifacts.",
570
NULL,
571
"hacks",
572
{
573
{ "disabled", NULL },
574
{ "Safe", NULL },
575
{ "Balanced", NULL },
576
{ "Aggressive", NULL },
577
{ NULL, NULL },
578
},
579
"disabled"
580
},
581
{
582
"ppsspp_gpu_hardware_transform",
583
"Hardware Transform",
584
NULL,
585
NULL,
586
NULL,
587
"video",
588
BOOL_OPTIONS,
589
"enabled"
590
},
591
{
592
"ppsspp_software_skinning",
593
"Software Skinning",
594
NULL,
595
"Combine skinned model draws on the CPU, faster in most games.",
596
NULL,
597
"video",
598
BOOL_OPTIONS,
599
"enabled"
600
},
601
{
602
"ppsspp_hardware_tesselation",
603
"Hardware Tesselation",
604
NULL,
605
"Uses hardware to make curves.",
606
NULL,
607
"video",
608
BOOL_OPTIONS,
609
"disabled"
610
},
611
{
612
"ppsspp_texture_scaling_type",
613
"Texture Upscale Type",
614
NULL,
615
NULL,
616
NULL,
617
"video",
618
{
619
{ "xbrz", "xBRZ" },
620
{ "hybrid", "Hybrid" },
621
{ "bicubic", "Bicubic" },
622
{ "hybrid_bicubic", "Hybrid + Bicubic" },
623
{ NULL, NULL },
624
},
625
"xbrz"
626
},
627
{
628
"ppsspp_texture_scaling_level",
629
"Texture Upscaling Level",
630
NULL,
631
"CPU heavy, some scaling may be delayed to avoid stutter.",
632
NULL,
633
"video",
634
{
635
{ "disabled", NULL },
636
{ "2x", NULL },
637
{ "3x", NULL },
638
{ "4x", NULL },
639
{ "5x", NULL },
640
{ NULL, NULL },
641
},
642
"disabled"
643
},
644
{
645
"ppsspp_texture_deposterize",
646
"Texture Deposterize",
647
NULL,
648
"Fixes visual banding glitches in upscaled textures.",
649
NULL,
650
"video",
651
BOOL_OPTIONS,
652
"disabled"
653
},
654
{
655
"ppsspp_texture_shader",
656
"Texture Shader",
657
NULL,
658
"Vulkan only, overrides 'Texture Scaling Type'.",
659
NULL,
660
"video",
661
{
662
{ "disabled", NULL },
663
{ "2xBRZ", "Tex2xBRZ" },
664
{ "4xBRZ", "Tex4xBRZ" },
665
{ "MMPX", "TexMMPX" },
666
{ NULL, NULL },
667
},
668
"disabled"
669
},
670
{
671
"ppsspp_texture_anisotropic_filtering",
672
"Anisotropic Filtering",
673
NULL,
674
NULL,
675
NULL,
676
"video",
677
{
678
{ "disabled", NULL },
679
{ "2x", NULL },
680
{ "4x", NULL },
681
{ "8x", NULL },
682
{ "16x", NULL },
683
{ NULL, NULL },
684
},
685
"16x"
686
},
687
{
688
"ppsspp_texture_filtering",
689
"Texture Filtering",
690
NULL,
691
NULL,
692
NULL,
693
"video",
694
{
695
{ "Auto", NULL },
696
{ "Nearest", NULL },
697
{ "Linear", NULL },
698
{ "Auto max quality", NULL },
699
{ NULL, NULL },
700
},
701
"Auto"
702
},
703
{
704
"ppsspp_smart_2d_texture_filtering",
705
"Smart 2D Texture Filtering",
706
NULL,
707
"Gets rid of some visual artifacts caused by unnecessary texture filtering in some 2D games, by switching to nearest filtering.",
708
NULL,
709
"video",
710
BOOL_OPTIONS,
711
"disabled"
712
},
713
{
714
"ppsspp_texture_replacement",
715
"Texture Replacement",
716
NULL,
717
NULL,
718
NULL,
719
"video",
720
BOOL_OPTIONS,
721
"disabled"
722
},
723
{
724
"ppsspp_enable_wlan",
725
"Enable Networking/WLAN (Beta, may break games)",
726
NULL,
727
NULL,
728
NULL,
729
"network",
730
BOOL_OPTIONS,
731
"disabled"
732
},
733
{
734
"ppsspp_change_mac_address01",
735
"MAC Address Pt 1: x-:--:--:--:--:--",
736
NULL,
737
NULL,
738
NULL,
739
"network",
740
MAC_ADDRESS_OPTIONS,
741
"0"
742
},
743
{
744
"ppsspp_change_mac_address02",
745
"MAC Address Pt 2: -x:--:--:--:--:--",
746
NULL,
747
NULL,
748
NULL,
749
"network",
750
MAC_ADDRESS_OPTIONS,
751
"0"
752
},
753
{
754
"ppsspp_change_mac_address03",
755
"MAC Address Pt 3: --:x-:--:--:--:--",
756
NULL,
757
NULL,
758
NULL,
759
"network",
760
MAC_ADDRESS_OPTIONS,
761
"0"
762
},
763
{
764
"ppsspp_change_mac_address04",
765
"MAC Address Pt 4: --:-x:--:--:--:--",
766
NULL,
767
NULL,
768
NULL,
769
"network",
770
MAC_ADDRESS_OPTIONS,
771
"0"
772
},
773
{
774
"ppsspp_change_mac_address05",
775
"MAC Address Pt 5: --:--:x-:--:--:--",
776
NULL,
777
NULL,
778
NULL,
779
"network",
780
MAC_ADDRESS_OPTIONS,
781
"0"
782
},
783
{
784
"ppsspp_change_mac_address06",
785
"MAC Address Pt 6: --:--:-x:--:--:--",
786
NULL,
787
NULL,
788
NULL,
789
"network",
790
MAC_ADDRESS_OPTIONS,
791
"0"
792
},
793
{
794
"ppsspp_change_mac_address07",
795
"MAC Address Pt 7: --:--:--:x-:--:--",
796
NULL,
797
NULL,
798
NULL,
799
"network",
800
MAC_ADDRESS_OPTIONS,
801
"0"
802
},
803
{
804
"ppsspp_change_mac_address08",
805
"MAC Address Pt 8: --:--:--:-x:--:--",
806
NULL,
807
NULL,
808
NULL,
809
"network",
810
MAC_ADDRESS_OPTIONS,
811
"0"
812
},
813
{
814
"ppsspp_change_mac_address09",
815
"MAC Address Pt 9: --:--:--:--:x-:--",
816
NULL,
817
NULL,
818
NULL,
819
"network",
820
MAC_ADDRESS_OPTIONS,
821
"0"
822
},
823
{
824
"ppsspp_change_mac_address10",
825
"MAC Address Pt 10: --:--:--:--:-x:--",
826
NULL,
827
NULL,
828
NULL,
829
"network",
830
MAC_ADDRESS_OPTIONS,
831
"0"
832
},
833
{
834
"ppsspp_change_mac_address11",
835
"MAC Address Pt 11: --:--:--:--:--:x-",
836
NULL,
837
NULL,
838
NULL,
839
"network",
840
MAC_ADDRESS_OPTIONS,
841
"0"
842
},
843
{
844
"ppsspp_change_mac_address12",
845
"MAC Address Pt 12: --:--:--:--:--:-x",
846
NULL,
847
NULL,
848
NULL,
849
"network",
850
MAC_ADDRESS_OPTIONS,
851
"0"
852
},
853
{
854
"ppsspp_wlan_channel",
855
"WLAN Channel",
856
NULL,
857
NULL,
858
NULL,
859
"network",
860
{
861
{ "Auto", NULL },
862
{ "1", NULL },
863
{ "6", NULL },
864
{ "11", NULL },
865
{ NULL, NULL },
866
},
867
"Auto"
868
},
869
{
870
"ppsspp_enable_builtin_pro_ad_hoc_server",
871
"Enable Built-in PRO Ad Hoc Server",
872
NULL,
873
NULL,
874
NULL,
875
"network",
876
BOOL_OPTIONS,
877
"disabled"
878
},
879
{
880
"ppsspp_change_pro_ad_hoc_server_address",
881
"Change PRO Ad Hoc Server IP Address ('localhost' = multiple instances)",
882
NULL,
883
NULL,
884
NULL,
885
"network",
886
{
887
{ "socom.cc", NULL },
888
{ "psp.gameplayer.club", NULL },
889
{ "myneighborsushicat.com", NULL },
890
{ "localhost", NULL },
891
{ "IP address", NULL },
892
{ NULL, NULL },
893
},
894
"socom.cc"
895
},
896
{
897
"ppsspp_pro_ad_hoc_server_address01",
898
"PRO Ad Hoc Server IP Address Pt 1: x--.---.---.---",
899
NULL,
900
NULL,
901
NULL,
902
"network",
903
IP_ADDRESS_OPTIONS,
904
"0"
905
},
906
{
907
"ppsspp_pro_ad_hoc_server_address02",
908
"PRO Ad Hoc Server IP Address Pt 2: -x-.---.---.---",
909
NULL,
910
NULL,
911
NULL,
912
"network",
913
IP_ADDRESS_OPTIONS,
914
"0"
915
},
916
{
917
"ppsspp_pro_ad_hoc_server_address03",
918
"PRO Ad Hoc Server IP Address Pt 3: --x.---.---.---",
919
NULL,
920
NULL,
921
NULL,
922
"network",
923
IP_ADDRESS_OPTIONS,
924
"0"
925
},
926
{
927
"ppsspp_pro_ad_hoc_server_address04",
928
"PRO Ad Hoc Server IP Address Pt 4: ---.x--.---.---",
929
NULL,
930
NULL,
931
NULL,
932
"network",
933
IP_ADDRESS_OPTIONS,
934
"0"
935
},
936
{
937
"ppsspp_pro_ad_hoc_server_address05",
938
"PRO Ad Hoc Server IP Address Pt 5: ---.-x-.---.---",
939
NULL,
940
NULL,
941
NULL,
942
"network",
943
IP_ADDRESS_OPTIONS,
944
"0"
945
},
946
{
947
"ppsspp_pro_ad_hoc_server_address06",
948
"PRO Ad Hoc Server IP Address Pt 6: ---.--x.---.---",
949
NULL,
950
NULL,
951
NULL,
952
"network",
953
IP_ADDRESS_OPTIONS,
954
"0"
955
},
956
{
957
"ppsspp_pro_ad_hoc_server_address07",
958
"PRO Ad Hoc Server IP Address Pt 7: ---.---.x--.---",
959
NULL,
960
NULL,
961
NULL,
962
"network",
963
IP_ADDRESS_OPTIONS,
964
"0"
965
},
966
{
967
"ppsspp_pro_ad_hoc_server_address08",
968
"PRO Ad Hoc Server IP Address Pt 8: ---.---.-x-.---",
969
NULL,
970
NULL,
971
NULL,
972
"network",
973
IP_ADDRESS_OPTIONS,
974
"0"
975
},
976
{
977
"ppsspp_pro_ad_hoc_server_address09",
978
"PRO Ad Hoc Server IP Address Pt 9: ---.---.--x.---",
979
NULL,
980
NULL,
981
NULL,
982
"network",
983
IP_ADDRESS_OPTIONS,
984
"0"
985
},
986
{
987
"ppsspp_pro_ad_hoc_server_address10",
988
"PRO Ad Hoc Server IP Address Pt 10: ---.---.---.x--",
989
NULL,
990
NULL,
991
NULL,
992
"network",
993
IP_ADDRESS_OPTIONS,
994
"0"
995
},
996
{
997
"ppsspp_pro_ad_hoc_server_address11",
998
"PRO Ad Hoc Server IP Address Pt 11: ---.---.---.-x-",
999
NULL,
1000
NULL,
1001
NULL,
1002
"network",
1003
IP_ADDRESS_OPTIONS,
1004
"0"
1005
},
1006
{
1007
"ppsspp_pro_ad_hoc_server_address12",
1008
"PRO Ad Hoc Server IP Address Pt 12: ---.---.---.--x",
1009
NULL,
1010
NULL,
1011
NULL,
1012
"network",
1013
IP_ADDRESS_OPTIONS,
1014
"0"
1015
},
1016
{
1017
"ppsspp_enable_upnp",
1018
"Enable UPnP (Need a few seconds to detect)",
1019
NULL,
1020
NULL,
1021
NULL,
1022
"network",
1023
BOOL_OPTIONS,
1024
"disabled"
1025
},
1026
{
1027
"ppsspp_upnp_use_original_port",
1028
"UPnP Use Original Port ('ON' = PSP compatibility)",
1029
NULL,
1030
NULL,
1031
NULL,
1032
"network",
1033
BOOL_OPTIONS,
1034
"enabled"
1035
},
1036
{
1037
"ppsspp_port_offset",
1038
"Port Offset ('0' = PSP compatibility)",
1039
NULL,
1040
NULL,
1041
NULL,
1042
"network",
1043
{
1044
{ "0", NULL },
1045
{ "1000", NULL },
1046
{ "2000", NULL },
1047
{ "3000", NULL },
1048
{ "4000", NULL },
1049
{ "5000", NULL },
1050
{ "6000", NULL },
1051
{ "7000", NULL },
1052
{ "8000", NULL },
1053
{ "9000", NULL },
1054
{ "10000", NULL },
1055
{ "11000", NULL },
1056
{ "12000", NULL },
1057
{ "13000", NULL },
1058
{ "14000", NULL },
1059
{ "15000", NULL },
1060
{ "16000", NULL },
1061
{ "17000", NULL },
1062
{ "18000", NULL },
1063
{ "19000", NULL },
1064
{ "20000", NULL },
1065
{ "31000", NULL },
1066
{ "32000", NULL },
1067
{ "33000", NULL },
1068
{ "34000", NULL },
1069
{ "35000", NULL },
1070
{ "36000", NULL },
1071
{ "37000", NULL },
1072
{ "38000", NULL },
1073
{ "39000", NULL },
1074
{ "40000", NULL },
1075
{ "41000", NULL },
1076
{ "42000", NULL },
1077
{ "43000", NULL },
1078
{ "44000", NULL },
1079
{ "45000", NULL },
1080
{ "46000", NULL },
1081
{ "47000", NULL },
1082
{ "48000", NULL },
1083
{ "49000", NULL },
1084
{ "50000", NULL },
1085
{ "51000", NULL },
1086
{ "52000", NULL },
1087
{ "53000", NULL },
1088
{ "54000", NULL },
1089
{ "55000", NULL },
1090
{ "56000", NULL },
1091
{ "57000", NULL },
1092
{ "58000", NULL },
1093
{ "59000", NULL },
1094
{ "60000", NULL },
1095
{ "61000", NULL },
1096
{ "62000", NULL },
1097
{ "63000", NULL },
1098
{ "64000", NULL },
1099
{ "65000", NULL },
1100
{ NULL, NULL },
1101
},
1102
"0"
1103
},
1104
{
1105
"ppsspp_minimum_timeout",
1106
"Minimum Timeout (Override in ms, '0' = default)",
1107
NULL,
1108
NULL,
1109
NULL,
1110
"network",
1111
{
1112
{ "0", NULL },
1113
{ "100", NULL },
1114
{ "200", NULL },
1115
{ "300", NULL },
1116
{ "400", NULL },
1117
{ "500", NULL },
1118
{ "600", NULL },
1119
{ "700", NULL },
1120
{ "800", NULL },
1121
{ "900", NULL },
1122
{ "1000", NULL },
1123
{ "1100", NULL },
1124
{ "1200", NULL },
1125
{ "1300", NULL },
1126
{ "1400", NULL },
1127
{ "1500", NULL },
1128
{ "1600", NULL },
1129
{ "1700", NULL },
1130
{ "1800", NULL },
1131
{ "1900", NULL },
1132
{ "2000", NULL },
1133
{ "3100", NULL },
1134
{ "3200", NULL },
1135
{ "3300", NULL },
1136
{ "3400", NULL },
1137
{ "3500", NULL },
1138
{ "3600", NULL },
1139
{ "3700", NULL },
1140
{ "3800", NULL },
1141
{ "3900", NULL },
1142
{ "4000", NULL },
1143
{ "4100", NULL },
1144
{ "4200", NULL },
1145
{ "4300", NULL },
1146
{ "4400", NULL },
1147
{ "4500", NULL },
1148
{ "4600", NULL },
1149
{ "4700", NULL },
1150
{ "4800", NULL },
1151
{ "4900", NULL },
1152
{ "5000", NULL },
1153
{ NULL, NULL },
1154
},
1155
"0"
1156
},
1157
{
1158
"ppsspp_forced_first_connect",
1159
"Forced First Connect (Faster connect)",
1160
NULL,
1161
NULL,
1162
NULL,
1163
"network",
1164
BOOL_OPTIONS,
1165
"disabled"
1166
},
1167
{ NULL, NULL, NULL, NULL, NULL, NULL, {{0}}, NULL },
1168
};
1169
1170
struct retro_core_options_v2 options_us = {
1171
option_cats_us,
1172
option_defs_us
1173
};
1174
1175
/*
1176
********************************
1177
* Language Mapping
1178
********************************
1179
*/
1180
1181
#ifndef HAVE_NO_LANGEXTRA
1182
struct retro_core_options_v2 *options_intl[RETRO_LANGUAGE_LAST] = {
1183
&options_us, /* RETRO_LANGUAGE_ENGLISH */
1184
NULL, /* RETRO_LANGUAGE_JAPANESE */
1185
NULL, /* RETRO_LANGUAGE_FRENCH */
1186
NULL, /* RETRO_LANGUAGE_SPANISH */
1187
NULL, /* RETRO_LANGUAGE_GERMAN */
1188
NULL, /* RETRO_LANGUAGE_ITALIAN */
1189
NULL, /* RETRO_LANGUAGE_DUTCH */
1190
NULL, /* RETRO_LANGUAGE_PORTUGUESE_BRAZIL */
1191
NULL, /* RETRO_LANGUAGE_PORTUGUESE_PORTUGAL */
1192
NULL, /* RETRO_LANGUAGE_RUSSIAN */
1193
NULL, /* RETRO_LANGUAGE_KOREAN */
1194
NULL, /* RETRO_LANGUAGE_CHINESE_TRADITIONAL */
1195
NULL, /* RETRO_LANGUAGE_CHINESE_SIMPLIFIED */
1196
NULL, /* RETRO_LANGUAGE_ESPERANTO */
1197
NULL, /* RETRO_LANGUAGE_POLISH */
1198
NULL, /* RETRO_LANGUAGE_VIETNAMESE */
1199
NULL, /* RETRO_LANGUAGE_ARABIC */
1200
NULL, /* RETRO_LANGUAGE_GREEK */
1201
NULL, /* RETRO_LANGUAGE_TURKISH */
1202
NULL, /* RETRO_LANGUAGE_SLOVAK */
1203
NULL, /* RETRO_LANGUAGE_PERSIAN */
1204
NULL, /* RETRO_LANGUAGE_HEBREW */
1205
NULL, /* RETRO_LANGUAGE_ASTURIAN */
1206
NULL, /* RETRO_LANGUAGE_FINNISH */
1207
NULL, /* RETRO_LANGUAGE_INDONESIAN */
1208
NULL, /* RETRO_LANGUAGE_SWEDISH */
1209
NULL, /* RETRO_LANGUAGE_UKRAINIAN */
1210
NULL, /* RETRO_LANGUAGE_CZECH */
1211
};
1212
#endif
1213
1214
/*
1215
********************************
1216
* Functions
1217
********************************
1218
*/
1219
1220
/* Handles configuration/setting of core options.
1221
* Should be called as early as possible - ideally inside
1222
* retro_set_environment(), and no later than retro_load_game()
1223
* > We place the function body in the header to avoid the
1224
* necessity of adding more .c files (i.e. want this to
1225
* be as painless as possible for core devs)
1226
*/
1227
1228
static INLINE void libretro_set_core_options(retro_environment_t environ_cb,
1229
bool *categories_supported)
1230
{
1231
unsigned version = 0;
1232
#ifndef HAVE_NO_LANGEXTRA
1233
unsigned language = 0;
1234
#endif
1235
1236
if (!environ_cb || !categories_supported)
1237
return;
1238
1239
*categories_supported = false;
1240
1241
if (!environ_cb(RETRO_ENVIRONMENT_GET_CORE_OPTIONS_VERSION, &version))
1242
version = 0;
1243
1244
if (version >= 2)
1245
{
1246
#ifndef HAVE_NO_LANGEXTRA
1247
struct retro_core_options_v2_intl core_options_intl;
1248
1249
core_options_intl.us = &options_us;
1250
core_options_intl.local = NULL;
1251
1252
if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1253
(language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH))
1254
core_options_intl.local = options_intl[language];
1255
1256
*categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2_INTL,
1257
&core_options_intl);
1258
#else
1259
*categories_supported = environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_V2,
1260
&options_us);
1261
#endif
1262
}
1263
else
1264
{
1265
size_t i, j;
1266
size_t option_index = 0;
1267
size_t num_options = 0;
1268
struct retro_core_option_definition
1269
*option_v1_defs_us = NULL;
1270
#ifndef HAVE_NO_LANGEXTRA
1271
size_t num_options_intl = 0;
1272
struct retro_core_option_v2_definition
1273
*option_defs_intl = NULL;
1274
struct retro_core_option_definition
1275
*option_v1_defs_intl = NULL;
1276
struct retro_core_options_intl
1277
core_options_v1_intl;
1278
#endif
1279
struct retro_variable *variables = NULL;
1280
char **values_buf = NULL;
1281
1282
/* Determine total number of options */
1283
while (true)
1284
{
1285
if (option_defs_us[num_options].key)
1286
num_options++;
1287
else
1288
break;
1289
}
1290
1291
if (version >= 1)
1292
{
1293
/* Allocate US array */
1294
option_v1_defs_us = (struct retro_core_option_definition *)
1295
calloc(num_options + 1, sizeof(struct retro_core_option_definition));
1296
1297
/* Copy parameters from option_defs_us array */
1298
for (i = 0; i < num_options; i++)
1299
{
1300
struct retro_core_option_v2_definition *option_def_us = &option_defs_us[i];
1301
struct retro_core_option_value *option_values = option_def_us->values;
1302
struct retro_core_option_definition *option_v1_def_us = &option_v1_defs_us[i];
1303
struct retro_core_option_value *option_v1_values = option_v1_def_us->values;
1304
1305
option_v1_def_us->key = option_def_us->key;
1306
option_v1_def_us->desc = option_def_us->desc;
1307
option_v1_def_us->info = option_def_us->info;
1308
option_v1_def_us->default_value = option_def_us->default_value;
1309
1310
/* Values must be copied individually... */
1311
while (option_values->value)
1312
{
1313
option_v1_values->value = option_values->value;
1314
option_v1_values->label = option_values->label;
1315
1316
option_values++;
1317
option_v1_values++;
1318
}
1319
}
1320
1321
#ifndef HAVE_NO_LANGEXTRA
1322
if (environ_cb(RETRO_ENVIRONMENT_GET_LANGUAGE, &language) &&
1323
(language < RETRO_LANGUAGE_LAST) && (language != RETRO_LANGUAGE_ENGLISH) &&
1324
options_intl[language])
1325
option_defs_intl = options_intl[language]->definitions;
1326
1327
if (option_defs_intl)
1328
{
1329
/* Determine number of intl options */
1330
while (true)
1331
{
1332
if (option_defs_intl[num_options_intl].key)
1333
num_options_intl++;
1334
else
1335
break;
1336
}
1337
1338
/* Allocate intl array */
1339
option_v1_defs_intl = (struct retro_core_option_definition *)
1340
calloc(num_options_intl + 1, sizeof(struct retro_core_option_definition));
1341
1342
/* Copy parameters from option_defs_intl array */
1343
for (i = 0; i < num_options_intl; i++)
1344
{
1345
struct retro_core_option_v2_definition *option_def_intl = &option_defs_intl[i];
1346
struct retro_core_option_value *option_values = option_def_intl->values;
1347
struct retro_core_option_definition *option_v1_def_intl = &option_v1_defs_intl[i];
1348
struct retro_core_option_value *option_v1_values = option_v1_def_intl->values;
1349
1350
option_v1_def_intl->key = option_def_intl->key;
1351
option_v1_def_intl->desc = option_def_intl->desc;
1352
option_v1_def_intl->info = option_def_intl->info;
1353
option_v1_def_intl->default_value = option_def_intl->default_value;
1354
1355
/* Values must be copied individually... */
1356
while (option_values->value)
1357
{
1358
option_v1_values->value = option_values->value;
1359
option_v1_values->label = option_values->label;
1360
1361
option_values++;
1362
option_v1_values++;
1363
}
1364
}
1365
}
1366
1367
core_options_v1_intl.us = option_v1_defs_us;
1368
core_options_v1_intl.local = option_v1_defs_intl;
1369
1370
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS_INTL, &core_options_v1_intl);
1371
#else
1372
environ_cb(RETRO_ENVIRONMENT_SET_CORE_OPTIONS, option_v1_defs_us);
1373
#endif
1374
}
1375
else
1376
{
1377
/* Allocate arrays */
1378
variables = (struct retro_variable *)calloc(num_options + 1,
1379
sizeof(struct retro_variable));
1380
values_buf = (char **)calloc(num_options, sizeof(char *));
1381
1382
if (!variables || !values_buf)
1383
goto error;
1384
1385
/* Copy parameters from option_defs_us array */
1386
for (i = 0; i < num_options; i++)
1387
{
1388
const char *key = option_defs_us[i].key;
1389
const char *desc = option_defs_us[i].desc;
1390
const char *default_value = option_defs_us[i].default_value;
1391
struct retro_core_option_value *values = option_defs_us[i].values;
1392
size_t buf_len = 3;
1393
size_t default_index = 0;
1394
1395
values_buf[i] = NULL;
1396
1397
if (desc)
1398
{
1399
size_t num_values = 0;
1400
1401
/* Determine number of values */
1402
while (true)
1403
{
1404
if (values[num_values].value)
1405
{
1406
/* Check if this is the default value */
1407
if (default_value)
1408
if (strcmp(values[num_values].value, default_value) == 0)
1409
default_index = num_values;
1410
1411
buf_len += strlen(values[num_values].value);
1412
num_values++;
1413
}
1414
else
1415
break;
1416
}
1417
1418
/* Build values string */
1419
if (num_values > 0)
1420
{
1421
buf_len += num_values - 1;
1422
buf_len += strlen(desc);
1423
1424
values_buf[i] = (char *)calloc(buf_len, sizeof(char));
1425
if (!values_buf[i])
1426
goto error;
1427
1428
strcpy(values_buf[i], desc);
1429
strcat(values_buf[i], "; ");
1430
1431
/* Default value goes first */
1432
strcat(values_buf[i], values[default_index].value);
1433
1434
/* Add remaining values */
1435
for (j = 0; j < num_values; j++)
1436
{
1437
if (j != default_index)
1438
{
1439
strcat(values_buf[i], "|");
1440
strcat(values_buf[i], values[j].value);
1441
}
1442
}
1443
}
1444
}
1445
1446
variables[option_index].key = key;
1447
variables[option_index].value = values_buf[i];
1448
option_index++;
1449
}
1450
1451
/* Set variables */
1452
environ_cb(RETRO_ENVIRONMENT_SET_VARIABLES, variables);
1453
}
1454
1455
error:
1456
/* Clean up */
1457
1458
if (option_v1_defs_us)
1459
{
1460
free(option_v1_defs_us);
1461
option_v1_defs_us = NULL;
1462
}
1463
1464
#ifndef HAVE_NO_LANGEXTRA
1465
if (option_v1_defs_intl)
1466
{
1467
free(option_v1_defs_intl);
1468
option_v1_defs_intl = NULL;
1469
}
1470
#endif
1471
1472
if (values_buf)
1473
{
1474
for (i = 0; i < num_options; i++)
1475
{
1476
if (values_buf[i])
1477
{
1478
free(values_buf[i]);
1479
values_buf[i] = NULL;
1480
}
1481
}
1482
1483
free(values_buf);
1484
values_buf = NULL;
1485
}
1486
1487
if (variables)
1488
{
1489
free(variables);
1490
variables = NULL;
1491
}
1492
}
1493
}
1494
1495
#ifdef __cplusplus
1496
}
1497
#endif
1498
1499
#endif
1500
1501