diff options
author | Solomon Peachy <pizza@shaftnet.org> | 2020-10-08 18:27:03 -0400 |
---|---|---|
committer | Solomon Peachy <pizza@shaftnet.org> | 2020-10-08 20:30:08 -0400 |
commit | 7a1bf015417250205c342d5d6e9f7cfa73265439 (patch) | |
tree | 640d702bb66d190fb60a6e6df6b54d8806ae4835 /firmware/drivers | |
parent | dc81f96fd1bf3ddfe4c9e750ff14a0238f85d776 (diff) | |
download | rockbox-7a1bf015417250205c342d5d6e9f7cfa73265439.tar.gz rockbox-7a1bf015417250205c342d5d6e9f7cfa73265439.zip |
Undo the hacks that allowed targets without LEFT/RIGHT (UP/DN) to build.
Replaced them with warnings until they are fixed *PROPERLY*
Change-Id: I4425200e60f8b5224262a54f105b974cec471d22
Diffstat (limited to 'firmware/drivers')
-rw-r--r-- | firmware/drivers/button.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index 58a9ab0b94..939f94884d 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c | |||
@@ -558,15 +558,20 @@ void button_close(void) | |||
558 | 558 | ||
559 | #ifdef HAVE_LCD_FLIP | 559 | #ifdef HAVE_LCD_FLIP |
560 | /* | 560 | /* |
561 | * helper function to swap LEFT/RIGHT, UP/DOWN (if present), and F1/F3 (Recorder) | 561 | * helper function to swap LEFT/RIGHT, UP/DOWN (if present) |
562 | */ | 562 | */ |
563 | static int button_flip(int button) | 563 | static int button_flip(int button) |
564 | { | 564 | { |
565 | int newbutton = button; | 565 | int newbutton = button; |
566 | 566 | ||
567 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) | 567 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
568 | newbutton &= | 568 | newbutton &= ~( |
569 | ~(BUTTON_LEFT | BUTTON_RIGHT | 569 | #if defined(BUTTON_LEFT) && defined(BUTTON_RIGHT) |
570 | BUTTON_LEFT | BUTTON_RIGHT | ||
571 | #else | ||
572 | #warning "LEFT/RIGHT not defined!" | ||
573 | 0 | ||
574 | #endif | ||
570 | #if defined(BUTTON_UP) && defined(BUTTON_DOWN) | 575 | #if defined(BUTTON_UP) && defined(BUTTON_DOWN) |
571 | | BUTTON_UP | BUTTON_DOWN | 576 | | BUTTON_UP | BUTTON_DOWN |
572 | #endif | 577 | #endif |
@@ -583,10 +588,15 @@ static int button_flip(int button) | |||
583 | #endif | 588 | #endif |
584 | ); | 589 | ); |
585 | 590 | ||
591 | #if defined(BUTTON_LEFT) && defined(BUTTON_RIGHT) | ||
586 | if (button & BUTTON_LEFT) | 592 | if (button & BUTTON_LEFT) |
587 | newbutton |= BUTTON_RIGHT; | 593 | newbutton |= BUTTON_RIGHT; |
588 | if (button & BUTTON_RIGHT) | 594 | if (button & BUTTON_RIGHT) |
589 | newbutton |= BUTTON_LEFT; | 595 | newbutton |= BUTTON_LEFT; |
596 | #else | ||
597 | #warning "LEFT/RIGHT not defined!" | ||
598 | #endif | ||
599 | |||
590 | #if defined(BUTTON_UP) && defined(BUTTON_DOWN) | 600 | #if defined(BUTTON_UP) && defined(BUTTON_DOWN) |
591 | if (button & BUTTON_UP) | 601 | if (button & BUTTON_UP) |
592 | newbutton |= BUTTON_DOWN; | 602 | newbutton |= BUTTON_DOWN; |