Lagrange [work/v1.8]

Audio init errors should not be fatal

=> 19a6424e4fca0372de8330141100ce4c234c6670

diff --git a/src/main.c b/src/main.c
index b1850283..efe96ad9 100644
--- a/src/main.c
+++ b/src/main.c
@@ -68,10 +68,13 @@ int main(int argc, char **argv) {
                           "DHE-RSA-AES256-GCM-SHA384");
     SDL_SetHint(SDL_HINT_VIDEO_ALLOW_SCREENSAVER, "1");
     SDL_SetHint(SDL_HINT_MAC_CTRL_CLICK_EMULATE_RIGHT_CLICK, "1");
-    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO | SDL_INIT_TIMER)) {
-        fprintf(stderr, "SDL init failed: %s\n", SDL_GetError());
+    if (SDL_Init(SDL_INIT_VIDEO | SDL_INIT_TIMER)) {
+        fprintf(stderr, "[SDL] init failed: %s\n", SDL_GetError());
         return -1;
     }
+    if (SDL_Init(SDL_INIT_AUDIO)) {
+        fprintf(stderr, "[SDL] audio init failed: %s\n", SDL_GetError());
+    }
     run_App(argc, argv);
     SDL_Quit();
 #if defined (LAGRANGE_ENABLE_MPG123)
Proxy Information
Original URL
gemini://git.skyjake.fi/lagrange/work%2Fv1.8/cdiff/19a6424e4fca0372de8330141100ce4c234c6670
Status Code
Success (20)
Meta
text/gemini; charset=utf-8
Capsule Response Time
57.696011 milliseconds
Gemini-to-HTML Time
0.338866 milliseconds

This content has been proxied by September (ba2dc).