Commit 651d8c6f authored by nanahira's avatar nanahira

Merge branch 'master' of github.com:mercury233/irrlicht into develop

parents 0b7ca349 456556db
Pipeline #37137 passed with stages
in 2 minutes and 25 seconds
...@@ -37,6 +37,9 @@ ...@@ -37,6 +37,9 @@
#endif #endif
#endif #endif
#endif #endif
#ifdef _MSC_VER
#pragma comment(lib, "imm32.lib")
#endif
namespace irr namespace irr
{ {
......
...@@ -143,10 +143,10 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device) ...@@ -143,10 +143,10 @@ bool COpenGLDriver::initDriver(CIrrDeviceWin32* device)
PIXELFORMATDESCRIPTOR pfd = { PIXELFORMATDESCRIPTOR pfd = {
sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor sizeof(PIXELFORMATDESCRIPTOR), // Size Of This Pixel Format Descriptor
1, // Version Number 1, // Version Number
PFD_DRAW_TO_WINDOW | // Format Must Support Window static_cast<DWORD>(PFD_DRAW_TO_WINDOW | // Format Must Support Window
PFD_SUPPORT_OPENGL | // Format Must Support OpenGL PFD_SUPPORT_OPENGL | // Format Must Support OpenGL
(Params.Doublebuffer?PFD_DOUBLEBUFFER:0) | // Must Support Double Buffering (Params.Doublebuffer ? PFD_DOUBLEBUFFER : 0) | // Must Support Double Buffering
(Params.Stereobuffer?PFD_STEREO:0), // Must Support Stereo Buffer (Params.Stereobuffer ? PFD_STEREO : 0)), // Must Support Stereo Buffer
PFD_TYPE_RGBA, // Request An RGBA Format PFD_TYPE_RGBA, // Request An RGBA Format
Params.Bits, // Select Our Color Depth Params.Bits, // Select Our Color Depth
0, 0, 0, 0, 0, 0, // Color Bits Ignored 0, 0, 0, 0, 0, 0, // Color Bits Ignored
......
...@@ -482,7 +482,6 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param) ...@@ -482,7 +482,6 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
IsActive(true), IsFullscreen(false), IsShiftDown(false), IsControlDown(false), IsResizable(false) IsActive(true), IsFullscreen(false), IsShiftDown(false), IsControlDown(false), IsResizable(false)
{ {
struct utsname name; struct utsname name;
NSString *path;
#ifdef _DEBUG #ifdef _DEBUG
setDebugName("CIrrDeviceMacOSX"); setDebugName("CIrrDeviceMacOSX");
...@@ -501,11 +500,13 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param) ...@@ -501,11 +500,13 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
[NSApp finishLaunching]; [NSApp finishLaunching];
} }
path = [[[NSBundle mainBundle] bundlePath] stringByDeletingLastPathComponent]; NSString* bundlePath = [[NSBundle mainBundle] bundlePath];
chdir([path fileSystemRepresentation]); if ([[bundlePath lowercaseString] hasSuffix:@".app"]) {
[path release]; NSString* path = [bundlePath stringByDeletingLastPathComponent];
chdir([path fileSystemRepresentation]);
}
} }
NSWindow* a;
uname(&name); uname(&name);
Operator = new COSOperator(name.version); Operator = new COSOperator(name.version);
os::Printer::log(name.version,ELL_INFORMATION); os::Printer::log(name.version,ELL_INFORMATION);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment