Commit 2e30bc5d authored by mercury233's avatar mercury233

Merge branch 'master' into patch-clipboard

parents d24a1e02 368b43c8
......@@ -325,9 +325,9 @@ HRESULT CD3D9ShaderMaterialRenderer::stubD3DXAssembleShader(LPCSTR pSrcData,
if (!pFn && !LoadFailed)
{
// try to load dll
irr::core::string<TCHAR> strDllName = "d3dx9_";
irr::core::string<TCHAR> strDllName = __TEXT("d3dx9_");
strDllName += (int)D3DX_SDK_VERSION;
strDllName += ".dll";
strDllName += __TEXT(".dll");
HMODULE hMod = LoadLibrary(strDllName.c_str());
if (hMod)
......@@ -385,9 +385,9 @@ HRESULT CD3D9ShaderMaterialRenderer::stubD3DXAssembleShaderFromFile(LPCSTR pSrcF
if (!pFn && !LoadFailed)
{
// try to load dll
irr::core::string<TCHAR> strDllName = "d3dx9_";
irr::core::string<TCHAR> strDllName = __TEXT("d3dx9_");
strDllName += (int)D3DX_SDK_VERSION;
strDllName += ".dll";
strDllName += __TEXT(".dll");
HMODULE hMod = LoadLibrary(strDllName.c_str());
if (hMod)
......@@ -446,9 +446,9 @@ HRESULT CD3D9ShaderMaterialRenderer::stubD3DXCompileShader(LPCSTR pSrcData, UINT
if (!pFn && !LoadFailed)
{
// try to load dll
irr::core::string<TCHAR> strDllName = "d3dx9_";
irr::core::string<TCHAR> strDllName = __TEXT("d3dx9_");
strDllName += (int)D3DX_SDK_VERSION;
strDllName += ".dll";
strDllName += __TEXT(".dll");
HMODULE hMod = LoadLibrary(strDllName.c_str());
if (hMod)
......@@ -506,9 +506,9 @@ HRESULT CD3D9ShaderMaterialRenderer::stubD3DXCompileShaderFromFile(LPCSTR pSrcFi
if (!pFn && !LoadFailed)
{
// try to load dll
irr::core::string<TCHAR> strDllName = "d3dx9_";
irr::core::string<TCHAR> strDllName = __TEXT("d3dx9_");
strDllName += (int)D3DX_SDK_VERSION;
strDllName += ".dll";
strDllName += __TEXT(".dll");
HMODULE hMod = LoadLibrary(strDllName.c_str());
if (hMod)
......
......@@ -325,7 +325,7 @@ bool CGUIListBox::OnEvent(const SEvent& event)
LastKeyTime = now;
// find the selected item, starting at the current selection
s32 start = Selected;
const s32 start = Selected;
// dont change selection if the key buffer matches the current item
if (Selected > -1 && KeyBuffer.size() > 1)
{
......@@ -341,7 +341,8 @@ bool CGUIListBox::OnEvent(const SEvent& event)
{
if (KeyBuffer.equals_ignore_case(Items[current].text.subString(0,KeyBuffer.size())))
{
if (Parent && Selected != current && !Selecting && !MoveOverSelect)
setSelected(current);
if (Parent && start != current && !Selecting && !MoveOverSelect)
{
SEvent e;
e.EventType = EET_GUI_EVENT;
......@@ -350,7 +351,6 @@ bool CGUIListBox::OnEvent(const SEvent& event)
e.GUIEvent.EventType = EGET_LISTBOX_CHANGED;
Parent->OnEvent(e);
}
setSelected(current);
return true;
}
}
......@@ -361,9 +361,9 @@ bool CGUIListBox::OnEvent(const SEvent& event)
{
if (KeyBuffer.equals_ignore_case(Items[current].text.subString(0,KeyBuffer.size())))
{
if (Parent && Selected != current && !Selecting && !MoveOverSelect)
setSelected(current);
if (Parent && start != current && !Selecting && !MoveOverSelect)
{
Selected = current;
SEvent e;
e.EventType = EET_GUI_EVENT;
e.GUIEvent.Caller = this;
......@@ -371,7 +371,6 @@ bool CGUIListBox::OnEvent(const SEvent& event)
e.GUIEvent.EventType = EGET_LISTBOX_CHANGED;
Parent->OnEvent(e);
}
setSelected(current);
return true;
}
}
......
......@@ -521,7 +521,6 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
//99 - AES encryption, WinZip 9
const SZipFileEntry &e = FileInfo[Files[index].ID];
wchar_t buf[64];
s16 actualCompressionMethod=e.header.CompressionMethod;
IReadFile* decrypted=0;
u8* decryptedBuf=0;
......@@ -620,8 +619,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
c8* pBuf = new c8[ uncompressedSize ];
if (!pBuf)
{
swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Not enough memory for decompressing", Files[index].FullName, ELL_ERROR);
if (decrypted)
decrypted->drop();
return 0;
......@@ -633,8 +631,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
pcData = new u8[decryptedSize];
if (!pcData)
{
swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Not enough memory for decompressing", Files[index].FullName, ELL_ERROR);
delete [] pBuf;
return 0;
}
......@@ -674,8 +671,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
if (err != Z_OK)
{
swprintf ( buf, 64, L"Error decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Error decompressing", Files[index].FullName, ELL_ERROR);
delete [] pBuf;
return 0;
}
......@@ -694,8 +690,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
c8* pBuf = new c8[ uncompressedSize ];
if (!pBuf)
{
swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Not enough memory for decompressing", Files[index].FullName, ELL_ERROR);
if (decrypted)
decrypted->drop();
return 0;
......@@ -707,8 +702,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
pcData = new u8[decryptedSize];
if (!pcData)
{
swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Not enough memory for decompressing", Files[index].FullName, ELL_ERROR);
delete [] pBuf;
return 0;
}
......@@ -745,8 +739,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
if (err != BZ_OK)
{
swprintf ( buf, 64, L"Error decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Error decompressing", Files[index].FullName, ELL_ERROR);
delete [] pBuf;
return 0;
}
......@@ -766,8 +759,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
c8* pBuf = new c8[ uncompressedSize ];
if (!pBuf)
{
swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Not enough memory for decompressing", Files[index].FullName, ELL_ERROR);
if (decrypted)
decrypted->drop();
return 0;
......@@ -779,8 +771,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
pcData = new u8[decryptedSize];
if (!pcData)
{
swprintf ( buf, 64, L"Not enough memory for decompressing %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("Not enough memory for decompressing", Files[index].FullName, ELL_ERROR);
delete [] pBuf;
return 0;
}
......@@ -826,8 +817,7 @@ IReadFile* CZipReader::createAndOpenFile(u32 index)
os::Printer::log("Decryption support not enabled. File cannot be read.", ELL_ERROR);
return 0;
default:
swprintf ( buf, 64, L"file has unsupported compression method. %s", Files[index].FullName.c_str() );
os::Printer::log( buf, ELL_ERROR);
os::Printer::log("file has unsupported compression method.", Files[index].FullName, ELL_ERROR);
return 0;
};
......
......@@ -494,6 +494,7 @@ CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
if(!CreationParams.WindowId) //load menus if standalone application
{
[[NSAutoreleasePool alloc] init];
[[NSApplication sharedApplication] setActivationPolicy:NSApplicationActivationPolicyRegular];
[[NSApplication sharedApplication] activateIgnoringOtherApps:YES];
[NSApp setDelegate:(id<NSApplicationDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
[NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]];
......
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