- code cleanup based on additional gcc warnings

This commit is contained in:
Mark Vejvoda 2013-11-19 06:29:30 +00:00
parent 4a4c7fbfde
commit 39b41cdfea
2 changed files with 30 additions and 26 deletions

View File

@ -52,7 +52,7 @@ public:
static uint64 getFlags() { return flags; }
static void setFlag(GlobalStaticFlagTypes flag) { flags |= flag; }
static bool isFlagSet(GlobalStaticFlagTypes flag) { return (flags & (unsigned int)flag) == flag; }
static bool isFlagSet(GlobalStaticFlagTypes flag) { return (flags & (unsigned int)flag) == (unsigned int)flag; }
protected:
static bool isNonGraphicalMode;

View File

@ -163,31 +163,35 @@ static inline void loadTexture(class ctx *ctx) {
glTexImage2D(GL_TEXTURE_2D, 0, 4, ctx->width, ctx->height, 0, GL_RGBA, GL_UNSIGNED_BYTE, (Uint8 *) rawData);
}
//static void *lock(void *data, void **p_pixels) {
// class ctx *ctx = (class ctx *)data;
// if(ctx->verboseEnabled) printf("In [%s] Line: %d\n",__FUNCTION__,__LINE__);
//
// SDL_LockMutex(ctx->mutex);
// SDL_LockSurface(ctx->surf);
// *p_pixels = ctx->surf->pixels;
//
// return NULL; /* picture identifier, not needed here */
//}
//
//static void unlock(void *data, void *id, void *const *p_pixels) {
// class ctx *ctx = (class ctx *)data;
// if(ctx->verboseEnabled) printf("In [%s] Line: %d\n",__FUNCTION__,__LINE__);
//
// /* VLC just rendered the video, but we can also render stuff */
// SDL_UnlockSurface(ctx->surf);
// SDL_UnlockMutex(ctx->mutex);
//}
//
//static void display(void *data, void *id) {
// // VLC wants to display the video
// class ctx *ctx = (class ctx *)data;
// if(ctx->verboseEnabled) printf("In [%s] Line: %d\n",__FUNCTION__,__LINE__);
//}
#ifdef HAS_LIBVLC
#if !defined(LIBVLC_VERSION_PRE_2) && !defined(LIBVLC_VERSION_PRE_1_1_0)
static void *lock(void *data, void **p_pixels) {
class ctx *ctx = (class ctx *)data;
if(ctx->verboseEnabled) printf("In [%s] Line: %d\n",__FUNCTION__,__LINE__);
SDL_LockMutex(ctx->mutex);
SDL_LockSurface(ctx->surf);
*p_pixels = ctx->surf->pixels;
return NULL; /* picture identifier, not needed here */
}
static void unlock(void *data, void *id, void *const *p_pixels) {
class ctx *ctx = (class ctx *)data;
if(ctx->verboseEnabled) printf("In [%s] Line: %d\n",__FUNCTION__,__LINE__);
/* VLC just rendered the video, but we can also render stuff */
SDL_UnlockSurface(ctx->surf);
SDL_UnlockMutex(ctx->mutex);
}
static void display(void *data, void *id) {
// VLC wants to display the video
class ctx *ctx = (class ctx *)data;
if(ctx->verboseEnabled) printf("In [%s] Line: %d\n",__FUNCTION__,__LINE__);
}
#endif
#endif
#if defined(HAS_LIBVLC) && defined(LIBVLC_VERSION_PRE_2) && defined(LIBVLC_VERSION_PRE_1_1_0)
static void catchError(libvlc_exception_t *ex) {