minor compiler warnings fixed
This commit is contained in:
parent
807ffcd7f2
commit
202e41c80c
@ -37,9 +37,9 @@ namespace priv
|
||||
{
|
||||
////////////////////////////////////////////////////////////
|
||||
RenderImageImplDefault::RenderImageImplDefault() :
|
||||
myContext(0),
|
||||
myWidth (0),
|
||||
myHeight (0),
|
||||
myContext(0)
|
||||
myHeight (0)
|
||||
{
|
||||
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ void Joystick::Initialize(unsigned int Index)
|
||||
|
||||
// Is there enough joystick ?
|
||||
CFIndex joysticksCount = CFSetGetCount(devices);
|
||||
if (joysticksCount <= Index) {
|
||||
if (joysticksCount <= CFIndex(Index)) {
|
||||
FreeUp();
|
||||
return;
|
||||
}
|
||||
@ -303,6 +303,9 @@ bool Joystick::RetriveElements(IOHIDDeviceRef device)
|
||||
// Too many buttons. We ignore this one.
|
||||
}
|
||||
break;
|
||||
|
||||
default: // Make compiler happy.
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -61,7 +61,7 @@ namespace sf {
|
||||
NSWindow* myWindow;
|
||||
SFOpenGLView* myOGLView;
|
||||
sf::priv::WindowImplCocoa* myRequester;
|
||||
sf::VideoMode myFullscreenMode;
|
||||
sf::VideoMode* myFullscreenMode; // Note : C++ ctor/dtor are not called for Obj-C fields.
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////
|
||||
|
@ -69,6 +69,7 @@
|
||||
{
|
||||
if ((self = [super init])) {
|
||||
myRequester = 0;
|
||||
myFullscreenMode = new sf::VideoMode();
|
||||
|
||||
// Retain the window for our own use.
|
||||
myWindow = [window retain];
|
||||
@ -121,6 +122,7 @@
|
||||
|
||||
if ((self = [super init])) {
|
||||
myRequester = 0;
|
||||
myFullscreenMode = new sf::VideoMode();
|
||||
|
||||
// Create our window size.
|
||||
NSRect rect = NSZeroRect;
|
||||
@ -128,7 +130,7 @@
|
||||
// We use desktop mode to size the window
|
||||
// but we set the back buffer size to 'mode' in applyContext method.
|
||||
|
||||
myFullscreenMode = mode;
|
||||
*myFullscreenMode = mode;
|
||||
|
||||
sf::VideoMode dm = sf::VideoMode::GetDesktopMode();
|
||||
rect = NSMakeRect(0, 0, dm.Width, dm.Height);
|
||||
@ -211,7 +213,7 @@
|
||||
// If a fullscreen window was requested...
|
||||
if (style & sf::Style::Fullscreen && mode != sf::VideoMode::GetDesktopMode()) {
|
||||
/// ... we set the "read size" of the view (that is the back buffer size).
|
||||
[myOGLView setRealSize:NSMakeSize(myFullscreenMode.Width, myFullscreenMode.Height)];
|
||||
[myOGLView setRealSize:NSMakeSize(myFullscreenMode->Width, myFullscreenMode->Height)];
|
||||
}
|
||||
|
||||
// Set the view to the window as its content view.
|
||||
@ -238,6 +240,8 @@
|
||||
[myWindow release];
|
||||
[myOGLView release];
|
||||
|
||||
delete myFullscreenMode;
|
||||
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
@ -431,10 +435,10 @@
|
||||
// If fullscreen was requested and the mode used to create the window
|
||||
// was not the desktop mode, we change the back buffer size of the
|
||||
// context.
|
||||
if (myFullscreenMode != sf::VideoMode()) {
|
||||
if (*myFullscreenMode != sf::VideoMode()) {
|
||||
CGLContextObj cgcontext = (CGLContextObj)[context CGLContextObj];
|
||||
|
||||
GLint dim[2] = {myFullscreenMode.Width, myFullscreenMode.Height};
|
||||
GLint dim[2] = {myFullscreenMode->Width, myFullscreenMode->Height};
|
||||
|
||||
CGLSetParameter(cgcontext, kCGLCPSurfaceBackingSize, dim);
|
||||
CGLEnable(cgcontext, kCGLCESurfaceBackingSize);
|
||||
|
Loading…
Reference in New Issue
Block a user