-
-
Notifications
You must be signed in to change notification settings - Fork 111
Expand file tree
/
Copy pathGCGameLoadSM.cpp
More file actions
1041 lines (886 loc) · 32.1 KB
/
Copy pathGCGameLoadSM.cpp
File metadata and controls
1041 lines (886 loc) · 32.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/****************************************************************************
* Copyright (C) 2012-2014 by Cyan
* Copyright (C) 2012 Dimok
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
****************************************************************************/
#include <unistd.h>
#include <gccore.h>
#include "settings/CSettings.h"
#include "settings/CGameStatistics.h"
#include "themes/CTheme.h"
#include "prompts/PromptWindows.h"
#include "prompts/DiscBrowser.h"
#include "prompts/filebrowser.h"
#include "usbloader/AlternateDOLOffsets.h"
#include "language/gettext.h"
#include "wad/nandtitle.h"
#include "system/IosLoader.h"
#include "GCGameLoadSM.hpp"
#include "utils/tools.h"
static const char * OnOffText[] =
{
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Auto" )
};
static const char * OnOffAskText[] =
{
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Ask" )
};
static const char * LanguageText[] =
{
trNOOP( "English" ),
trNOOP( "German" ),
trNOOP( "French" ),
trNOOP( "Spanish" ),
trNOOP( "Italian" ),
trNOOP( "Dutch" ),
trNOOP( "Console Default" )
};
static const char * ParentalText[] =
{
trNOOP( "0 (Everyone)" ),
trNOOP( "1 (Child 7+)" ),
trNOOP( "2 (Teen 12+)" ),
trNOOP( "3 (Mature 16+)" ),
trNOOP( "4 (Adults Only 18+)" )
};
static const char * GCMode[] =
{
trNOOP( "MIOS (Default & Customs)" ),
trNOOP( "Devolution" ),
trNOOP( "Nintendont" )
};
static const char * MCPGameID[] =
{
trNOOP( "OFF"),
trNOOP( "Full ID" ),
trNOOP( "Short ID" )
};
static const char * DMLVideoText[] =
{
trNOOP( "Auto" ),
trNOOP( "System Default" ),
trNOOP( "Disc Default" ),
trNOOP( "Force PAL50" ),
trNOOP( "Force PAL60" ),
trNOOP( "Force NTSC" ),
"", // unused
trNOOP( "Force PAL480p" ),
trNOOP( "Force NTSC480p" ),
trNOOP( "None" )
};
static const char * DMLNMMMode[] =
{
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Debug" )
};
static const char * DMLDebug[] =
{
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Debug Wait" )
};
static const char * DEVOMCText[] =
{
trNOOP( "OFF" ),
trNOOP( "ON" ),
trNOOP( "Individual" ),
trNOOP( "Regional" )
};
static const char * NINMCText[] =
{
trNOOP( "OFF" ),
trNOOP( "Individual" ),
trNOOP( "ON (Multi)" )
};
// Nintendont screwed this up and made 4 act as off
static const char * NINGamepadText[] =
{
trNOOP( "1" ),
trNOOP( "2" ),
trNOOP( "3" ),
trNOOP( "4" ),
trNOOP( "None" )
};
static int currentGCmode = 0;
GCGameLoadSM::GCGameLoadSM(struct discHdr *hdr)
: SettingsMenu(tr("Game Load"), &GuiOptions, MENU_NONE),
Header(hdr)
{
GameConfig = *GameSettings.GetGameCFG((const char *) Header->id);
if(!btnOutline)
btnOutline = Resources::GetImageData("button_dialogue_box.png");
if(!trigA)
trigA = new GuiTrigger();
trigA->SetSimpleTrigger(-1, WPAD_BUTTON_A | WPAD_CLASSIC_BUTTON_A, PAD_BUTTON_A);
saveBtnTxt = new GuiText(tr( "Save" ), 22, thColor("r=0 g=0 b=0 a=255 - prompt windows button text color"));
saveBtnTxt->SetMaxWidth(btnOutline->GetWidth() - 30);
saveBtnImg = new GuiImage (btnOutline);
if (Settings.wsprompt == ON)
{
saveBtnTxt->SetWidescreen(Settings.widescreen);
saveBtnImg->SetWidescreen(Settings.widescreen);
}
saveBtn = new GuiButton(saveBtnImg, saveBtnImg, 2, 3, 180, 400, trigA, btnSoundOver, btnSoundClick2, 1);
saveBtn->SetLabel(saveBtnTxt);
Append(saveBtn);
currentGCmode = GameConfig.GameCubeMode == INHERIT ? Settings.GameCubeMode : GameConfig.GameCubeMode;
SetOptionNames();
SetOptionValues();
}
GCGameLoadSM::~GCGameLoadSM()
{
HaltGui();
//! The rest is destroyed in SettingsMenu.cpp
Remove(saveBtn);
delete saveBtnTxt;
delete saveBtnImg;
delete saveBtn;
ResumeGui();
}
void GCGameLoadSM::SetDefaultConfig()
{
char id[7];
snprintf(id, sizeof(id), GameConfig.id);
GameSettings.SetDefault(GameConfig);
snprintf(GameConfig.id, sizeof(GameConfig.id), id);
}
void GCGameLoadSM::SetOptionNames()
{
int Idx = 0;
Options->SetName(Idx++, "%s", tr( "Game Lock" ));
Options->SetName(Idx++, "%s", tr( "Favorite Level" ));
Options->SetName(Idx++, "%s", tr( "Game Language" ));
Options->SetName(Idx++, "%s", tr( "Parental Control" ));
Options->SetName(Idx++, "%s", tr( "MemCard PRO" ));
Options->SetName(Idx++, "%s", tr( "GameCube Mode" ));
if(currentGCmode == GC_MODE_MIOS &&IosLoader::GetMIOSInfo() > DEFAULT_MIOS)
{
Options->SetName(Idx++, "%s", tr( "--== DIOS MIOS (Lite)" ));
Options->SetName(Idx++, "%s", tr( "Video Mode" ));
Options->SetName(Idx++, "%s", tr( "Progressive Patch" ));
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_1)
Options->SetName(Idx++, "%s", tr( "Force Widescreen" ));
Options->SetName(Idx++, "%s", tr( "Ocarina" ));
Options->SetName(Idx++, "%s", tr( "NMM Mode" ));
Options->SetName(Idx++, "%s", tr( "Debug" ));
Options->SetName(Idx++, "%s", tr( "LED Activity" ));
Options->SetName(Idx++, "%s", tr( "PAD Hook" ));
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1)
Options->SetName(Idx++, "%s", tr( "No Disc+" ));
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_5)
Options->SetName(Idx++, "%s", tr( "Screenshot" ));
Options->SetName(Idx++, "%s", tr( "Japanese Patch" ));
}
if(currentGCmode == GC_MODE_NINTENDONT)
{
Options->SetName(Idx++, "%s", tr( "--== Nintendont" ));
Options->SetName(Idx++, "%s", tr( "Video Mode" ));
Options->SetName(Idx++, "%s", tr( "Progressive Patch" ));
Options->SetName(Idx++, "%s", tr( "Video Deflicker" ));
Options->SetName(Idx++, "%s", tr( "PAL50 Patch" ));
Options->SetName(Idx++, "%s", tr( "Force Widescreen" ));
Options->SetName(Idx++, "%s", tr( "Wii U Widescreen" ));
Options->SetName(Idx++, "%s", tr( "Video scale" ));
if(GameConfig.NINVideoScale > 0)
Options->SetName(Idx++, "%s", tr( "Video Scale Value" ));
Options->SetName(Idx++, "%s", tr( "Video offset" ));
Options->SetName(Idx++, "%s", tr( "Ocarina" ));
Options->SetName(Idx++, "%s", tr( "Remove Read Speed Limit" ));
Options->SetName(Idx++, "%s", tr( "Triforce Arcade Mode" ));
Options->SetName(Idx++, "%s", tr("CC Rumble"));
Options->SetName(Idx++, "%s", tr("Skip IPL"));
Options->SetName(Idx++, "%s", tr( "BBA Emulation" ));
Options->SetName(Idx++, "%s", tr( "BBA Net Profile" ));
Options->SetName(Idx++, "%s", tr( "Memory Card Emulation" ));
Options->SetName(Idx++, "%s", tr( "Memory Card Blocks Size" ));
Options->SetName(Idx++, "%s", tr( "USB-HID Controller" ));
Options->SetName(Idx++, "%s", tr( "GameCube Controller" ));
Options->SetName(Idx++, "%s", tr( "Wii U GamePad Slot" ));
Options->SetName(Idx++, "%s", tr( "Native Controller" ));
Options->SetName(Idx++, "%s", tr( "LED Activity" ));
Options->SetName(Idx++, "%s", tr( "Debug" ));
Options->SetName(Idx++, "%s", tr( "OSReport" ));
Options->SetName(Idx++, "%s", tr( "Log to file" ));
Options->SetName(Idx++, "%s", tr( "Nintendont Loader Path" ));
}
if(currentGCmode == GC_MODE_DEVOLUTION)
{
Options->SetName(Idx++, "%s", tr( "--== Devolution" ));
Options->SetName(Idx++, "%s", tr( "Memory Card Emulation" ));
Options->SetName(Idx++, "%s", tr( "Force Widescreen" ));
Options->SetName(Idx++, "%s", tr( "LED Activity" ));
Options->SetName(Idx++, "%s", tr( "F-Zero AX" ));
Options->SetName(Idx++, "%s", tr( "Timer Fix" ));
Options->SetName(Idx++, "%s", tr( "D Buttons" ));
Options->SetName(Idx++, "%s", tr( "Crop Overscan" ));
Options->SetName(Idx++, "%s", tr( "Disc Read Delay" ));
Options->SetName(Idx++, "%s", tr( "Progressive Patch" ));
Options->SetName(Idx++, "%s", tr( "Return To" ));
}
}
void GCGameLoadSM::SetOptionValues()
{
int Idx = 0;
//! Settings: Game Lock
Options->SetValue(Idx++, "%s", tr( OnOffText[GameConfig.Locked] ));
//! Settings: Favorite Level
Options->SetValue(Idx++, "%i", GameStatistics.GetFavoriteRank(Header->id));
//! Settings: Game Language
if(GameConfig.language == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(LanguageText[GameConfig.language]));
//! Settings: Parental Control
Options->SetValue(Idx++, "%s", tr(ParentalText[GameConfig.parentalcontrol]));
//! Settings: MemCard PRO
if(GameConfig.MemCardProGameID == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(MCPGameID[GameConfig.MemCardProGameID]));
//! Settings: GameCube Mode
if(GameConfig.GameCubeMode == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(GCMode[GameConfig.GameCubeMode]));
if(currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS)
{
//! Settings: GameCube TITLE : DIOS MIOS (Lite) + Nintendont
Options->SetValue(Idx++, "==-- ");
//! Settings: DML + NIN Video Mode
if(GameConfig.DMLVideo == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(DMLVideoText[GameConfig.DMLVideo]));
//! Settings: DML + NIN Progressive Patch
if(GameConfig.DMLProgPatch == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLProgPatch]));
//! Settings: DML + NIN Force Widescreen
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_1)
{
if(GameConfig.DMLWidescreen == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLWidescreen]));
}
//! Settings: Ocarina
if(GameConfig.ocarina == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffAskText[GameConfig.ocarina]));
//! Settings: DML + NIN NMM Mode
if(GameConfig.DMLNMM == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(DMLNMMMode[GameConfig.DMLNMM]));
//! Settings: DML + NIN Debug
if(GameConfig.DMLDebug == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(DMLDebug[GameConfig.DMLDebug]));
//! Settings: DML LED Activity
if(GameConfig.DMLActivityLED == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLActivityLED]));
//! Settings: DML PAD Hook
if(GameConfig.DMLPADHOOK == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLPADHOOK]));
//! Settings: DML Extended No Disc
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1)
{
if(GameConfig.DMLNoDisc2 == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLNoDisc2]));
}
//! Settings: DML Screenshot
if(IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_5)
{
if(GameConfig.DMLScreenshot == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLScreenshot]));
}
//! Settings: DML Japanese Patch
if(GameConfig.DMLJPNPatch == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLJPNPatch]));
}
if(currentGCmode == GC_MODE_NINTENDONT)
{
//! Settings: GameCube TITLE : DIOS MIOS (Lite) + Nintendont
Options->SetValue(Idx++, "==-- ");
//! Settings: DML + NIN Video Mode
if(GameConfig.DMLVideo == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(DMLVideoText[GameConfig.DMLVideo]));
//! Settings: DML + NIN Progressive Patch
if(GameConfig.DMLProgPatch == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLProgPatch]));
//! Settings: NIN Video Deflicker
if(GameConfig.NINDeflicker == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINDeflicker]));
//! Settings: NIN PAL50 Patch
if(GameConfig.NINPal50Patch == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINPal50Patch]));
//! Settings: DML + NIN Force Widescreen
if(GameConfig.DMLWidescreen == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLWidescreen]));
//! Settings: Wii U Widescreen
if(GameConfig.NINWiiUWide == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINWiiUWide]));
//! Settings: NIN VideoScale
if(GameConfig.NINVideoScale == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else if(GameConfig.NINVideoScale == 0)
Options->SetValue(Idx++, tr("Auto"));
else
Options->SetValue(Idx++, "Manual (40~120)");
if(GameConfig.NINVideoScale > 0)
Options->SetValue(Idx++, "%d", GameConfig.NINVideoScale);
//! Settings: NIN VideoOffset
if(GameConfig.NINVideoOffset == INHERIT-20)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%d (-20~20)", GameConfig.NINVideoOffset);
//! Settings: Ocarina
if(GameConfig.ocarina == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffAskText[GameConfig.ocarina]));
//! Settings: Remove Read Speed Limiter
if(GameConfig.NINRemlimit == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINRemlimit]));
//! Settings: NIN Arcade Mode
if(GameConfig.NINArcadeMode == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINArcadeMode]));
//! Settings: NIN CC Rumble
if (GameConfig.NINCCRumble == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINCCRumble]));
//! Settings: NIN Skip IPL
if (GameConfig.NINSkipIPL == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINSkipIPL]));
//! Settings: NIN BBA Emulation
if (GameConfig.NINBBA == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINBBA]));
//! Settings: NIN BBA Net Profile
if(GameConfig.NINBBAProfile == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else if(GameConfig.NINBBAProfile == 0)
Options->SetValue(Idx++, tr("Auto"));
else
Options->SetValue(Idx++, "%i", GameConfig.NINBBAProfile);
//! Settings: NIN Memory Card Emulation
if(GameConfig.NINMCEmulation == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(NINMCText[GameConfig.NINMCEmulation]));
//! Settings: NIN Memory Card Blocks Size
if(GameConfig.NINMCSize == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%d", MEM_CARD_BLOCKS(GameConfig.NINMCSize));
//! Settings: NIN USB-HID Controller
if(GameConfig.NINUSBHID == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINUSBHID]));
//! Settings: NIN MaxPads - Number of GameCube Controllers
if(GameConfig.NINMaxPads == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%i", GameConfig.NINMaxPads);
//! Settings: NIN Wii U GamePad Slot
if(GameConfig.NINWiiUGamepadSlot == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(NINGamepadText[GameConfig.NINWiiUGamepadSlot]));
//! Settings: NIN Native Controller
if(GameConfig.NINNativeSI == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINNativeSI]));
//! Settings: NIN LED Activity
if(GameConfig.NINLED == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINLED]));
//! Settings: DML + NIN Debug
if(GameConfig.DMLDebug == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(DMLDebug[GameConfig.DMLDebug]));
//! Settings: NIN OS Report
if(GameConfig.NINOSReport == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINOSReport]));
//! Settings: NIN Log to file
if(GameConfig.NINLog == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.NINLog]));
//! Settings: NIN Individual Loader path setting
if(GameConfig.NINLoaderPath.size() == 0)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", GameConfig.NINLoaderPath.c_str());
}
if(currentGCmode == GC_MODE_DEVOLUTION)
{
//! Settings: GameCube TITLE : Devolution
Options->SetValue(Idx++, "==-- ");
//! Settings: DEVO Memory Card Emulation
if(GameConfig.DEVOMCEmulation == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(DEVOMCText[GameConfig.DEVOMCEmulation]));
//! Settings: DEVO Widescreen Patch
if(GameConfig.DEVOWidescreen == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVOWidescreen]));
//! Settings: DEVO Activity LED
if(GameConfig.DEVOActivityLED == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVOActivityLED]));
//! Settings: DEVO F-Zero AX unlock patch
if(GameConfig.DEVOFZeroAX == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVOFZeroAX]));
//! Settings: DEVO Timer Fix
if(GameConfig.DEVOTimerFix == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVOTimerFix]));
//! Settings: DEVO Direct Button Mapping
if(GameConfig.DEVODButtons == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVODButtons]));
//! Settings: DEVO Crop Overscan
if(GameConfig.DEVOCropOverscan == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVOCropOverscan]));
//! Settings: DEVO Disc Read Delay
if(GameConfig.DEVODiscDelay == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DEVODiscDelay]));
//! Settings: DML + NIN + DEVO Progressive Patch
if(GameConfig.DMLProgPatch == INHERIT)
Options->SetValue(Idx++, tr("Use global"));
else
Options->SetValue(Idx++, "%s", tr(OnOffText[GameConfig.DMLProgPatch]));
//! Settings: DEVO Return To
if(GameConfig.returnTo)
{
const char* TitleName = NULL;
u64 tid = NandTitles.FindU32(Settings.returnTo);
if (tid > 0)
TitleName = NandTitles.NameOf(tid);
Options->SetValue(Idx++, "%s", TitleName ? TitleName : strlen(Settings.returnTo) > 0 ?
Settings.returnTo : tr( OnOffText[0] ));
}
else
{
Options->SetValue(Idx++, "%s", tr( OnOffText[0] ));
}
}
}
int GCGameLoadSM::GetMenuInternal()
{
if (saveBtn->GetState() == STATE_CLICKED)
{
if (GameSettings.AddGame(GameConfig) && GameSettings.Save())
{
WindowPrompt(tr( "Successfully Saved" ), 0, tr( "OK" ));
}
else
WindowPrompt(tr( "Save Failed. No device inserted?" ), 0, tr( "OK" ));
saveBtn->ResetState();
}
int ret = optionBrowser->GetClickedOption();
if (ret < 0)
return MENU_NONE;
int Idx = -1;
//! Settings: Game Lock
if (ret == ++Idx)
{
if (++GameConfig.Locked >= MAX_ON_OFF) GameConfig.Locked = 0;
}
//! Settings: Favorite Level
else if (ret == ++Idx)
{
int Level = GameStatistics.GetFavoriteRank(Header->id);
if (++Level > 5) Level = 0;
GameStatistics.SetFavoriteRank(Header->id, Level);
GameStatistics.Save();
}
//! Settings: Game Language
else if (ret == ++Idx)
{
if (++GameConfig.language >= GC_MAX_LANGUAGE) GameConfig.language = INHERIT;
}
//! Settings: Parental Control
else if (ret == ++Idx)
{
if (++GameConfig.parentalcontrol >= 5) GameConfig.parentalcontrol = 0;
}
//! Settings: MemCard PRO
else if (ret == ++Idx)
{
if (++GameConfig.MemCardProGameID >= MEMCARDPRO_GAMEID_MAX_CHOICE) GameConfig.MemCardProGameID = INHERIT;
}
//! Settings: GameCube Mode
else if (ret == ++Idx)
{
if (++GameConfig.GameCubeMode >= CG_MODE_MAX_CHOICE) GameConfig.GameCubeMode = INHERIT;
currentGCmode = GameConfig.GameCubeMode == INHERIT ? Settings.GameCubeMode : GameConfig.GameCubeMode;
Options->ClearList();
SetOptionNames();
SetOptionValues();
}
//! Settings: GameCube TITLE : DIOS MIOS (Lite) + Nintendont
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
// This one is a category title
}
//! Settings: DML Video Mode
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
GameConfig.DMLVideo++;
if(GameConfig.DMLVideo == DML_VIDEO_FORCE_PATCH) // Skip Force Patch
GameConfig.DMLVideo++;
if(GameConfig.DMLVideo >= DML_VIDEO_MAX_CHOICE) GameConfig.DMLVideo = INHERIT;
}
//! Settings: DML Progressive Patch
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
if (++GameConfig.DMLProgPatch >= MAX_ON_OFF) GameConfig.DMLProgPatch = INHERIT;
}
//! Settings: DML Force Widescreen
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_1 && ret == ++Idx)
{
if (++GameConfig.DMLWidescreen >= MAX_ON_OFF) GameConfig.DMLWidescreen = INHERIT;
}
//! Settings: Ocarina
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
if (++GameConfig.ocarina >= OCARINA_MAX) GameConfig.ocarina = INHERIT;
}
//! Settings: DML NMM Mode
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
if (++GameConfig.DMLNMM >= 3) GameConfig.DMLNMM = INHERIT;
}
//! Settings: DML Debug
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
if (++GameConfig.DMLDebug >= 3) GameConfig.DMLDebug = INHERIT;
}
//! Settings: DML LED Activity
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
if (++GameConfig.DMLActivityLED >= MAX_ON_OFF) GameConfig.DMLActivityLED = INHERIT;
}
//! Settings: DML PAD Hook
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
if (++GameConfig.DMLPADHOOK >= MAX_ON_OFF) GameConfig.DMLPADHOOK = INHERIT;
}
//! Settings: DML Extended No Disc
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_2_2 && IosLoader::GetDMLVersion() <= DML_VERSION_DML_2_2_1 && ret == ++Idx)
{
if (++GameConfig.DMLNoDisc2 >= MAX_ON_OFF) GameConfig.DMLNoDisc2 = INHERIT;
}
//! Settings: DML Screenshot
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && IosLoader::GetDMLVersion() >= DML_VERSION_DM_2_5 && ret == ++Idx)
{
if (++GameConfig.DMLScreenshot >= MAX_ON_OFF) GameConfig.DMLScreenshot = INHERIT;
}
//! Settings: DML Japanese Patch
else if (currentGCmode == GC_MODE_MIOS && IosLoader::GetMIOSInfo() > DEFAULT_MIOS && ret == ++Idx)
{
if (++GameConfig.DMLJPNPatch >= MAX_ON_OFF) GameConfig.DMLJPNPatch = INHERIT;
}
//! Settings: GameCube TITLE : DIOS MIOS (Lite) + Nintendont
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
// This one is a category title
}
//! Settings: NIN Video Mode
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
GameConfig.DMLVideo++;
if(GameConfig.DMLVideo == DML_VIDEO_FORCE_PATCH) // Skip Force Patch
GameConfig.DMLVideo++;
if(GameConfig.DMLVideo >= DML_VIDEO_MAX_CHOICE) GameConfig.DMLVideo = INHERIT;
}
//! Settings: NIN Progressive Patch
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.DMLProgPatch >= MAX_ON_OFF) GameConfig.DMLProgPatch = INHERIT;
}
//! Settings: NIN Video Deflicker
if(currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINDeflicker >= MAX_ON_OFF) GameConfig.NINDeflicker = INHERIT;
}
//! Settings: NIN PAL50 Patch
if(currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINPal50Patch >= MAX_ON_OFF) GameConfig.NINPal50Patch = INHERIT;
}
//! Settings: NIN Force Widescreen
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.DMLWidescreen >= MAX_ON_OFF) GameConfig.DMLWidescreen = INHERIT;
}
//! Settings: Wii U Widescreen
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINWiiUWide >= MAX_ON_OFF) GameConfig.NINWiiUWide = INHERIT;
}
//! Settings: NIN VideoScale
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (GameConfig.NINVideoScale == INHERIT) GameConfig.NINVideoScale = 0;
else if (GameConfig.NINVideoScale == 0) GameConfig.NINVideoScale = 40;
else if (GameConfig.NINVideoScale >= 0) GameConfig.NINVideoScale = INHERIT;
Options->ClearList();
SetOptionNames();
SetOptionValues();
}
else if (currentGCmode == GC_MODE_NINTENDONT && GameConfig.NINVideoScale > 0 && ret == ++Idx)
{
char entry[20];
snprintf(entry, sizeof(entry), "%i", GameConfig.NINVideoScale);
int ret = OnScreenNumpad(entry, sizeof(entry));
if(ret)
{
GameConfig.NINVideoScale = LIMIT(atoi(entry), 40, 120);
}
}
//! Settings: NIN VideoOffset
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
char entry[20];
snprintf(entry, sizeof(entry), "%i", GameConfig.NINVideoOffset);
int ret = OnScreenNumpad(entry, sizeof(entry));
if(ret)
GameConfig.NINVideoOffset = LIMIT(atoi(entry), -21, 20);
}
//! Settings: Ocarina
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.ocarina >= OCARINA_MAX) GameConfig.ocarina = INHERIT;
}
//! Settings: Remove Read Speed Limiter
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINRemlimit >= MAX_ON_OFF) GameConfig.NINRemlimit = INHERIT;
}
//! Settings: NIN Arcade Mode
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINArcadeMode >= MAX_ON_OFF) GameConfig.NINArcadeMode = INHERIT;
}
//! Settings: NIN CC Rumble
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINCCRumble >= MAX_ON_OFF) GameConfig.NINCCRumble = INHERIT;
}
//! Settings: NIN Skip IPL
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINSkipIPL >= MAX_ON_OFF) GameConfig.NINSkipIPL = INHERIT;
}
//! Settings: NIN BBA Emulation
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINBBA >= MAX_ON_OFF) GameConfig.NINBBA = INHERIT;
}
//! Settings: NIN BBA Net Profile
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINBBAProfile >= NIN_BBA_MAX_CHOICE) GameConfig.NINBBAProfile = INHERIT;
}
//! Settings: NIN Memory Card Emulation
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINMCEmulation >= NIN_MC_MAX_CHOICE) GameConfig.NINMCEmulation = INHERIT;
}
//! Settings: NIN Memory Card Blocks Size
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINMCSize >= 6) GameConfig.NINMCSize = INHERIT;
if (GameConfig.NINMCSize == 5)
WindowPrompt(tr("Warning:"), tr("Memory Card with 2043 blocs has issues with Nintendont. Use at your own risk."), tr("Ok"));
}
//! Settings: NIN USB-HID Controller
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINUSBHID >= MAX_ON_OFF) GameConfig.NINUSBHID = INHERIT;
}
//! Settings: NIN MaxPads - Number of GameCube Controllers
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINMaxPads >= 5) GameConfig.NINMaxPads = INHERIT;
}
//! Settings: NIN Wii U GamePad Slot
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINWiiUGamepadSlot >= 5) GameConfig.NINWiiUGamepadSlot = INHERIT;
}
//! Settings: NIN Native Controller
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINNativeSI >= MAX_ON_OFF) GameConfig.NINNativeSI = INHERIT;
}
//! Settings: NIN LED Activity
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINLED >= MAX_ON_OFF) GameConfig.NINLED = INHERIT;
}
//! Settings: NIN Debug
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.DMLDebug >= 3) GameConfig.DMLDebug = INHERIT;
}
//! Settings: NIN OS Report
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINOSReport >= MAX_ON_OFF) GameConfig.NINOSReport = INHERIT;
}
//! Settings: NIN Log to file
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
if (++GameConfig.NINLog >= MAX_ON_OFF) GameConfig.NINLog = INHERIT;
}
//! Settings: NIN Individual Loader path setting
else if (currentGCmode == GC_MODE_NINTENDONT && ret == ++Idx)
{
char entered[100];
snprintf(entered, sizeof(entered), GameConfig.NINLoaderPath.c_str());
HaltGui();
GuiWindow * parent = (GuiWindow *) parentElement;
if(parent) parent->SetState(STATE_DISABLED);
this->SetState(STATE_DEFAULT);
this->Remove(optionBrowser);
ResumeGui();
int result = BrowseDevice(entered, sizeof(entered), FB_DEFAULT, noFILES);
if(parent) parent->SetState(STATE_DEFAULT);
this->Append(optionBrowser);
if (result == 1)
{
if (entered[strlen(entered)-1] != '/')
strcat(entered, "/");
GameConfig.NINLoaderPath = entered;
WindowPrompt(tr( "Path Changed" ), 0, tr( "OK" ));
}
}
//! Settings: GameCube TITLE : Devolution
else if (currentGCmode == GC_MODE_DEVOLUTION && ret == ++Idx)
{
// This one is a category title
}
//! Settings: DEVO MemCard emulation
else if (currentGCmode == GC_MODE_DEVOLUTION && ret == ++Idx)
{
if (++GameConfig.DEVOMCEmulation >= DEVO_MC_MAX_CHOICE) GameConfig.DEVOMCEmulation = INHERIT;
}
//! Settings: DEVO Widescreen Patch
else if (currentGCmode == GC_MODE_DEVOLUTION && ret == ++Idx)
{
if (++GameConfig.DEVOWidescreen >= MAX_ON_OFF) GameConfig.DEVOWidescreen = INHERIT;
}
//! Settings: DEVO Activity LED
else if (currentGCmode == GC_MODE_DEVOLUTION && ret == ++Idx)
{
if (++GameConfig.DEVOActivityLED >= MAX_ON_OFF) GameConfig.DEVOActivityLED = INHERIT;
}
//! Settings: DEVO F-Zero AX unlock patch
else if (currentGCmode == GC_MODE_DEVOLUTION && ret == ++Idx)
{
if (++GameConfig.DEVOFZeroAX >= MAX_ON_OFF) GameConfig.DEVOFZeroAX = INHERIT;
}