Skip to content

Commit 04065f5

Browse files
committed
Fri 29 May 2020 16:39:02 EDT
1 parent 895b592 commit 04065f5

File tree

1 file changed

+52
-16
lines changed
  • Components/odroid-go-pcengine-huexpress/odroid-go-common/components/odroid

1 file changed

+52
-16
lines changed

Components/odroid-go-pcengine-huexpress/odroid-go-common/components/odroid/odroid_hud.c

Lines changed: 52 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -462,7 +462,7 @@ THEME GUI;
462462

463463
void hud_volume() {
464464
// y=176;
465-
int32_t VOLUME = odroid_audio_volume_get();
465+
int32_t VOLUME = odroid_settings_Volume_get();
466466
int LIMIT = OPTIONS - 3;
467467
bool active = OPTION == LIMIT ? true : false;
468468
hud_bar((SCREEN.w - 120), 176, VOLUME * 12.5, active);
@@ -539,7 +539,7 @@ THEME GUI;
539539
} else {
540540
STATE = EXTRAS[OPTION-LIMIT];
541541
}
542-
printf("\n**********\n%s - %d:%d\n**********\n", STATE.label, OPTION, LIMIT);
542+
printf("\n**********\n%s - OPTIONS:%d OPTION:%d LIMIT:%d\n**********\n", STATE.label, OPTIONS, OPTION, LIMIT);
543543

544544
fsy = 156;
545545
hud_frameskip();
@@ -573,9 +573,9 @@ THEME GUI;
573573

574574
//{#pragma region Menu
575575
void hud_menu(void) {
576-
int volume = odroid_audio_volume_get();
576+
VOLUME = odroid_settings_Volume_get();
577577
#ifdef CONFIG_LCD_DRIVER_CHIP_RETRO_ESP32
578-
volume = 8;
578+
//volume = 8;
579579
#endif
580580
odroid_audio_terminate();
581581
hud_init();
@@ -606,23 +606,59 @@ THEME GUI;
606606
usleep(200000);
607607
//debounce(ODROID_INPUT_DOWN);
608608
}
609-
if(STATE.action == 6) {
610-
/*
611-
LEFT
612-
*/
613-
if(gamepad.values[ODROID_INPUT_LEFT]) {
609+
/*
610+
LEFT
611+
*/
612+
if(gamepad.values[ODROID_INPUT_LEFT]) {
613+
if(STATE.action == 6) {
614614
if(frameskip > 2) {frameskip--;}
615615
hud_options();
616-
usleep(200000);
617616
}
618-
/*
619-
RIGHT
620-
*/
621-
if(gamepad.values[ODROID_INPUT_RIGHT]) {
617+
if(OPTION == OPTIONS - 3) {
618+
if(VOLUME > 0) {
619+
VOLUME--;
620+
odroid_audio_volume_set(VOLUME);
621+
odroid_settings_Volume_set(VOLUME);
622+
hud_options();
623+
usleep(200000);
624+
}
625+
}
626+
if(OPTION == OPTIONS - 3 + 1) {
627+
if(BRIGHTNESS > 0) {
628+
BRIGHTNESS--;
629+
odroid_settings_Backlight_set(BRIGHTNESS);
630+
hud_options();
631+
usleep(200000);
632+
}
633+
}
634+
usleep(200000);
635+
}
636+
/*
637+
RIGHT
638+
*/
639+
if(gamepad.values[ODROID_INPUT_RIGHT]) {
640+
if(STATE.action == 6) {
622641
if(frameskip < 10) {frameskip++;}
623642
hud_options();
624-
usleep(200000);
643+
}
644+
if(OPTION == OPTIONS - 3) {
645+
if(VOLUME < 8) {
646+
VOLUME++;
647+
odroid_audio_volume_set(VOLUME);
648+
odroid_settings_Volume_set(VOLUME);
649+
hud_options();
650+
usleep(200000);
651+
}
625652
}
653+
if(OPTION == OPTIONS - 3 + 1) {
654+
if(BRIGHTNESS < (BRIGHTNESS_COUNT-1)) {
655+
BRIGHTNESS++;
656+
odroid_settings_Backlight_set(BRIGHTNESS);
657+
hud_options();
658+
usleep(200000);
659+
}
660+
}
661+
usleep(200000);
626662
}
627663
/*
628664
BUTTON B
@@ -636,7 +672,7 @@ THEME GUI;
636672
BUTTON A
637673
*/
638674
if (gamepad.values[ODROID_INPUT_A]) {
639-
odroid_audio_volume_set(volume);
675+
odroid_settings_Volume_set(VOLUME);
640676
hud_debug(STATE.label);
641677
ACTION = STATE.action;
642678
switch(ACTION) {

0 commit comments

Comments
 (0)