shithub: zelda3

Download patch

ref: f0163c162e96c7a480b20712c8de3ef625a0074f
parent: e6e88979ca7fe9ab4bfd55324450bbb88c72fd46
author: Snesrev <snesrev@protonmail.com>
date: Sat Sep 17 12:27:02 EDT 2022

Add missing static and feature guard

--- a/hud.c
+++ b/hud.c
@@ -1540,6 +1540,8 @@
 }
 
 void Hud_HandleItemSwitchInputs() {
+  if (!(enhanced_features0 & kFeatures0_SwitchLR))
+    return;
   if (filtered_joypad_L & (0x20 | 0x10)) {  // left/right shoulder
     int old_item = hud_cur_item;
     for (int i = 0; ; i++) {
@@ -1562,7 +1564,7 @@
   }
 }
 
-void Hud_ReorderItem(int direction) {
+static void Hud_ReorderItem(int direction) {
   // Initialize inventory order on first use
   if (hud_inventory_order[0] == 0) {
     for (int i = 0; i < 24; i++)