shithub: mp3dec

Download patch

ref: ad04f4973d6291f392598ef5b328d2ea117df6e6
parent: ffa5069968ddc9c5e85817e819265f0d6f6128eb
author: lieff <[email protected]>
date: Sat Jan 25 18:51:45 EST 2020

Fix warnings in player.

--- a/player/build.sh
+++ b/player/build.sh
@@ -1,3 +1,3 @@
 ./build-sdl.sh $1
 
-gcc -O2 -o player *.cpp *.c -lstdc++ -lGL -lpthread -lm -ldl -LSDL/build-$1 -ISDL/include -lSDL2
+gcc -O2 -o player *.cpp *.c -lstdc++ -lpthread -lm -ldl -LSDL/build-$1 -ISDL/include -lSDL2
--- a/player/player.cpp
+++ b/player/player.cpp
@@ -61,7 +61,8 @@
     glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
     glTexImage2D(GL_TEXTURE_2D, 0, GL_RGBA8, width, height, 0, GL_RGBA, GL_UNSIGNED_BYTE, pix);
 #ifdef USE_GLES3
-    glGenerateMipmap(GL_TEXTURE_2D);
+    if (glGenerateMipmap)
+        glGenerateMipmap(GL_TEXTURE_2D);
 #endif
     return (int)tex;
 }
@@ -124,6 +125,7 @@
     nk_sdl_font_stash_begin(&atlas);
     atlas->default_font = nk_font_atlas_add_from_memory(atlas, FreeSans, FreeSansLen, 20, &fconfig);;
     nk_sdl_font_stash_end();
+    return true;
 }
 
 static void tick()
--- a/player/system.cpp
+++ b/player/system.cpp
@@ -447,7 +447,7 @@
 #endif
 }
 
-bool thread_sleep(uint32_t milliseconds)
+void thread_sleep(uint32_t milliseconds)
 {
 #ifdef _WIN32
     Sleep(milliseconds);
--- a/player/system.h
+++ b/player/system.h
@@ -96,7 +96,7 @@
 bool thread_close(HANDLE thread);
 void *thread_wait(HANDLE thread);
 bool thread_name(const char *name);
-bool thread_sleep(uint32_t milliseconds);
+void thread_sleep(uint32_t milliseconds);
 
 uint64_t GetTime();