CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutSign UpSign In
hrydgard

CoCalc provides the best real-time collaborative environment for Jupyter Notebooks, LaTeX documents, and SageMath, scalable from individual users to large groups and classes!

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