diff --git a/Quake2-iOS/SDL_uikitviewcontroller+Additions.swift b/Quake2-iOS/SDL_uikitviewcontroller+Additions.swift index 448d4bd..ee5dd67 100644 --- a/Quake2-iOS/SDL_uikitviewcontroller+Additions.swift +++ b/Quake2-iOS/SDL_uikitviewcontroller+Additions.swift @@ -256,7 +256,6 @@ extension SDL_uikitviewcontroller { prevWeaponButton = UIButton(frame: CGRect(x: (rect.width / 3), y: rect.height/2, width: (rect.width / 3), height: rect.height/2)) prevWeaponButton.addTarget(self, action: #selector(self.prevWeaponPressed), for: .touchDown) prevWeaponButton.addTarget(self, action: #selector(self.prevWeaponReleased), for: .touchUpInside) - prevWeaponButton.alpha = 0 return prevWeaponButton } @@ -264,7 +263,6 @@ extension SDL_uikitviewcontroller { nextWeaponButton = UIButton(frame: CGRect(x: (rect.width / 3), y: 0, width: (rect.width / 3), height: rect.height/2)) nextWeaponButton.addTarget(self, action: #selector(self.nextWeaponPressed), for: .touchDown) nextWeaponButton.addTarget(self, action: #selector(self.nextWeaponReleased), for: .touchUpInside) - nextWeaponButton.alpha = 0 return nextWeaponButton } diff --git a/Quake2/client/input/sdl.m b/Quake2/client/input/sdl.m index 2eb8157..cb90f1b 100644 --- a/Quake2/client/input/sdl.m +++ b/Quake2/client/input/sdl.m @@ -456,8 +456,6 @@ Cbuf_AddText(va("bind JOY3 \"cmd help\"\n")); Cbuf_AddText(va("bind JOY5 \"weapnext\"\n")); Cbuf_AddText(va("bind JOY6 \"weapprev\"\n")); - Cbuf_AddText(va("bind MWHEELDOWN \"weapprev\"\n")); - Cbuf_AddText(va("bind MWHEELUP \"weapnext\"\n")); break; } @@ -1350,6 +1348,9 @@ [motionManager startDeviceMotionUpdates]; #endif #endif + + Cbuf_AddText(va("bind MWHEELDOWN \"weapprev\"\n")); + Cbuf_AddText(va("bind MWHEELUP \"weapnext\"\n")); /* Joystick init */ if (!SDL_WasInit(SDL_INIT_GAMECONTROLLER | SDL_INIT_HAPTIC))