diff gui/interface.c @ 36772:0da6c7ff95d2

Revise code of listMgr() command PLAYLIST_ITEM_GET_POS. Use uintptr_t type return variable. Additionally, include stdint.h.
author ib
date Mon, 17 Feb 2014 00:39:09 +0000
parents e788bcd9d49b
children f5320e43d458
line wrap: on
line diff
--- a/gui/interface.c	Sun Feb 16 16:30:05 2014 +0000
+++ b/gui/interface.c	Mon Feb 17 00:39:09 2014 +0000
@@ -17,6 +17,7 @@
  */
 
 #include <stdarg.h>
+#include <stdint.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <string.h>
@@ -209,7 +210,7 @@
 
     if (playlist && !filename) {
         uiSetFile(playlist->path, playlist->name, STREAMTYPE_FILE);
-        guiInfo.Tracks = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
+        guiInfo.Tracks = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
         guiInfo.Track  = 1;
         filename       = NULL; // don't start playing
     }
@@ -619,7 +620,7 @@
         switch (guiInfo.StreamType) {
         case STREAMTYPE_FILE:
         case STREAMTYPE_STREAM:
-            guiInfo.Tracks = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
+            guiInfo.Tracks = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, 0);
             break;
 
         case STREAMTYPE_CDDA:
@@ -812,7 +813,7 @@
         if (next) {
             uiSetFile(next->path, next->name, STREAMTYPE_FILE);
             guiInfo.NewPlay = GUI_FILE_NEW;
-            guiInfo.Track   = (intptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
+            guiInfo.Track   = (uintptr_t)listMgr(PLAYLIST_ITEM_GET_POS, next);
         } else {
             if (guiInfo.NewPlay == GUI_FILE_NEW)
                 break;