DEADSOFTWARE

sdlmixer: fix menu
[flatwaifu.git] / src / sdlmixer / sound.c
index ddacddf2497ff55556609a01a2303242de686649..593f1389dda3318a8e8cfad4f0df7e4fc958e366 100644 (file)
@@ -1,11 +1,27 @@
+/* Copyright (C) 2020 SovietPony
+ *
+ * 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, version 3 of the License ONLY.
+ *
+ * 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 "glob.h"
 #include "sound.h"
 #include "music.h"
-#include "misc.h" // int2host
 #include "memory.h" // M_lock M_unlock
 #include "files.h" // F_findres
 #include "error.h"
 
+#include "common/endianness.h"
+
 #include "SDL.h"
 #include "SDL_mixer.h"
 #include <assert.h>
@@ -85,7 +101,7 @@ void MUS_update (void) {
 
 /* Sound */
 
-static int sound_menu_handler (menu_msg_t *msg, const menu_t *m, void *data, int i) {
+static int sound_menu_handler (menu_msg_t *msg, const menu_t *m, int i) {
   static int cur;
   enum { VOLUME, __NUM__ };
   static const simple_menu_t sm = {
@@ -105,9 +121,7 @@ static int sound_menu_handler (menu_msg_t *msg, const menu_t *m, void *data, int
 }
 
 const menu_t *S_menu (void) {
-  static const menu_t m = {
-    NULL, &sound_menu_handler
-  };
+  static const menu_t m = { sound_menu_handler };
   return &m;
 }