SDL: Fixed clang warnings.

This commit is contained in:
bkaradzic 2014-01-30 20:31:49 -08:00
parent 402bfe0760
commit 8c27ed5962
4 changed files with 12 additions and 9 deletions

View File

@ -10,13 +10,11 @@
#include "entry.h"
#ifndef ENTRY_CONFIG_USE_SDL
# define ENTRY_CONFIG_USE_SDL 0 //BX_PLATFORM_OSX
#endif // ENTRY_CONFIG_USE_SDL
#ifndef ENTRY_CONFIG_USE_NATIVE
# define ENTRY_CONFIG_USE_NATIVE !ENTRY_CONFIG_USE_SDL
#endif // ENTRY_CONFIG_USE_NATIVE
#if !defined(ENTRY_CONFIG_USE_SDL) && \
!defined(ENTRY_CONFIG_USE_NATIVE)
# define ENTRY_CONFIG_USE_SDL 0
# define ENTRY_CONFIG_USE_NATIVE 1
#endif // ...
#if !defined(ENTRY_DEFAULT_WIDTH) && !defined(ENTRY_DEFAULT_HEIGHT)
# define ENTRY_DEFAULT_WIDTH 1280

View File

@ -338,8 +338,8 @@ namespace entry
SDL_Event event;
SDL_UserEvent& uev = event.user;
uev.type = SDL_USER_SET_WINDOW_SIZE;
uev.data1 = (void*)_width;
uev.data2 = (void*)_height;
uev.data1 = reinterpret_cast<void*>(_width);
uev.data2 = reinterpret_cast<void*>(_height);
SDL_PushEvent(&event);
}

View File

@ -13,6 +13,10 @@ project ("example-common")
BGFX_DIR .. "3rdparty",
}
defines {
-- "ENTRY_CONFIG_USE_SDL=1",
}
files {
BGFX_DIR .. "examples/common/**.cpp",
BGFX_DIR .. "examples/common/**.h",

View File

@ -117,6 +117,7 @@ function exampleProject(_name, _uuid)
links {
"Cocoa.framework",
"OpenGL.framework",
-- "SDL2",
}
configuration { "ios*" }