Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Y
ygopro
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
0
Issues
0
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Packages
Packages
Container Registry
Analytics
Analytics
CI / CD
Code Review
Insights
Issues
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
MyCard
ygopro
Commits
3146d0d2
Commit
3146d0d2
authored
Dec 11, 2021
by
nanahira
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix windows build and remove irrlicht premake files
parent
f8496c5c
Pipeline
#7722
failed with stages
in 6 minutes and 22 seconds
Changes
4
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
0 additions
and
888 deletions
+0
-888
.gitlab-ci.yml
.gitlab-ci.yml
+0
-1
premake/irrlicht/irrlicht-mac.patch
premake/irrlicht/irrlicht-mac.patch
+0
-258
premake/irrlicht/irrlicht.patch
premake/irrlicht/irrlicht.patch
+0
-305
premake/irrlicht/premake5.lua
premake/irrlicht/premake5.lua
+0
-324
No files found.
.gitlab-ci.yml
View file @
3146d0d2
...
...
@@ -151,7 +151,6 @@ exec_windows:
script
:
-
git submodule update --init
-
bash -c 'cp -rf premake/* .'
-
cmd /C "patch -p0 < irrlicht\irrlicht.patch"
-
'
.\premake5.exe
vs2019'
-
cmd /c '"C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\MSBuild\Current\Bin\msbuild.exe" build\ygo.sln /m /p:Configuration=Release'
-
copy bin\release\ygopro.exe .
...
...
premake/irrlicht/irrlicht-mac.patch
deleted
100755 → 0
View file @
f8496c5c
diff --git a/source/Irrlicht/CGUIEditBox.cpp b/source/Irrlicht/CGUIEditBox.cpp
index 395fb69..323c9a2 100644
--- a/source/Irrlicht/CGUIEditBox.cpp
+++ b/source/Irrlicht/CGUIEditBox.cpp
@@ -287,9 +287,11 @@
bool CGUIEditBox::processKey(const SEvent& event)
const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd;
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
- core::stringc s;
- s = Text.subString(realmbgn, realmend - realmbgn).c_str();
- Operator->copyToClipboard(s.c_str());
+ const int max_char_size = sizeof(wchar_t) * 3 / 2;
+ int max_size = (realmend - realmbgn)*max_char_size + 1;
+ c8 *s = new char[max_size];
+ wcstombs(s, Text.subString(realmbgn, realmend-realmbgn).c_str(), max_size);
+ Operator->copyToClipboard(s);
}
break;
case KEY_KEY_X:
@@ -300,9 +302,11 @@
bool CGUIEditBox::processKey(const SEvent& event)
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
// copy
- core::stringc sc;
- sc = Text.subString(realmbgn, realmend - realmbgn).c_str();
- Operator->copyToClipboard(sc.c_str());
+ const int max_char_size = sizeof(wchar_t) * 3 / 2;
+ int max_size = (realmend - realmbgn)*max_char_size + 1;
+ c8 *s = new char[max_size];
+ wcstombs(s, Text.subString(realmbgn, realmend-realmbgn).c_str(), max_size);
+ Operator->copyToClipboard(s);
if (isEnabled())
{
diff --git a/source/Irrlicht/MacOSX/AppDelegate.h b/source/Irrlicht/MacOSX/AppDelegate.h
index ccb116d..29705f2 100644
--- a/source/Irrlicht/MacOSX/AppDelegate.h
+++ b/source/Irrlicht/MacOSX/AppDelegate.h
@@ -10,7 +10,7 @@
#import <Cocoa/Cocoa.h>
#import "CIrrDeviceMacOSX.h"
-@interface AppDelegate : NSObject
+@interface AppDelegate : NSTextView <NSApplicationDelegate>
{
BOOL _quit;
irr::CIrrDeviceMacOSX *_device;
diff --git a/source/Irrlicht/MacOSX/AppDelegate.mm b/source/Irrlicht/MacOSX/AppDelegate.mm
index 14a7f86..0ab0c43 100644
--- a/source/Irrlicht/MacOSX/AppDelegate.mm
+++ b/source/Irrlicht/MacOSX/AppDelegate.mm
@@ -74,6 +74,30 @@
return (_quit);
}
+
+- (void)keyDown:(NSEvent *)event
+{
+ [self interpretKeyEvents:@[event]];
+}
+
+- (void)insertText:(id)string
+{
+ [self setString: @""];
+ if ([string isKindOfClass:[NSAttributedString class]])
+ {
+ _device->handleInputEvent([[string string] UTF8String]);
+ }
+ else
+ {
+ _device->handleInputEvent([string UTF8String]);
+ }
+}
+
+- (void)doCommandBySelector:(SEL)selector
+{
+ _device->processKeyEvent();
+}
+
@end
#endif // _IRR_COMPILE_WITH_OSX_DEVICE_
diff --git a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
index f629588..d2fefae 100644
--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
+++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.h
@@ -95,6 +95,8 @@
namespace irr
void setMouseLocation(int x, int y);
void setResize(int width, int height);
void setCursorVisible(bool visible);
+ void handleInputEvent(const char *str);
+ void processKeyEvent();
private:
diff --git a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
index ad493fc..8692d0c 100644
--- a/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
+++ b/source/Irrlicht/MacOSX/CIrrDeviceMacOSX.mm
@@ -496,7 +496,7 @@
CIrrDeviceMacOSX::CIrrDeviceMacOSX(const SIrrlichtCreationParameters& param)
{
[[NSAutoreleasePool alloc] init];
[NSApplication sharedApplication];
- [NSApp setDelegate:(id<NSFileManagerDelegate>)[[[AppDelegate alloc] initWithDevice:this] autorelease]];
+ [NSApp setDelegate:[[[[AppDelegate alloc] initWithDevice:this] initWithFrame:NSZeroRect] autorelease]];
[NSBundle loadNibNamed:@"MainMenu" owner:[NSApp delegate]];
[NSApp finishLaunching];
}
@@ -592,6 +592,38 @@
void CIrrDeviceMacOSX::closeDevice()
CGLContext = NULL;
}
+void CIrrDeviceMacOSX::processKeyEvent()
+{
+ irr::SEvent ievent;
+ NSEvent *event = [[NSApplication sharedApplication] currentEvent];
+ postKeyEvent(event, ievent, true);
+}
+
+void CIrrDeviceMacOSX::handleInputEvent(const char *cStr)
+{
+ SEvent ievent;
+
+ // TODO: we should have such a function in core::string
+ size_t lenOld = strlen(cStr);
+ wchar_t *ws = new wchar_t[lenOld + 1];
+ size_t len = mbstowcs(ws,cStr,lenOld);
+ ws[len] = 0;
+ irr::core::stringw widep(ws);
+ delete[] ws;
+
+ ievent.EventType = irr::EET_KEY_INPUT_EVENT;
+ ievent.KeyInput.Key = (irr::EKEY_CODE)0;
+ ievent.KeyInput.PressedDown = true;
+ ievent.KeyInput.Shift = false;
+ ievent.KeyInput.Control = false;
+
+ for (int i = 0; i < widep.size(); ++i)
+ {
+ ievent.KeyInput.Char = widep[i];
+ postEventFromUser(ievent);
+ }
+}
+
bool CIrrDeviceMacOSX::createWindow()
{
CGDisplayErr error;
@@ -881,6 +913,8 @@
bool CIrrDeviceMacOSX::createWindow()
newSwapInterval = (CreationParams.Vsync) ? 1 : 0;
CGLSetParameter(CGLContext,kCGLCPSwapInterval,&newSwapInterval);
}
+
+ [[Window contentView] addSubview:(AppDelegate*)[NSApp delegate]];
}
return (result);
@@ -971,6 +1005,33 @@
bool CIrrDeviceMacOSX::run()
os::Timer::tick();
storeMouseLocation();
+ auto focusElement = getGUIEnvironment()->getFocus();
+ bool editing = focusElement && focusElement->getType() == irr::gui::EGUIET_EDIT_BOX;
+
+ if (!editing)
+ {
+ [Window makeFirstResponder:nil];
+ }
+ else
+ {
+ auto textView = (NSTextView*)[NSApp delegate];
+ auto crect = focusElement->getAbsolutePosition();
+
+ // ensure font height enough to fill the rect, otherwize ime window will overlaps the edit box
+ [textView setFont:[NSFont userFontOfSize:crect.getHeight()]];
+
+ // change origin from top left to bottom right
+ NSRect rect = {
+ crect.UpperLeftCorner.X,
+ [[textView superview] frame].size.height - crect.LowerRightCorner.Y,
+ crect.getWidth(), crect.getHeight(),
+ };
+ [textView setFrame:rect];
+
+ // start to receive input events
+ [Window makeFirstResponder:textView];
+ }
+
event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
if (event != nil)
{
@@ -979,6 +1040,13 @@
bool CIrrDeviceMacOSX::run()
switch([(NSEvent *)event type])
{
case NSKeyDown:
+ if (editing)
+ {
+ // delegate to text edit control to handle text input
+ [NSApp sendEvent:event];
+ break;
+ }
+
postKeyEvent(event,ievent,true);
break;
@@ -1199,22 +1267,22 @@
void CIrrDeviceMacOSX::postKeyEvent(void *event,irr::SEvent &ievent,bool pressed
}
else
{
- cStr = (unsigned char *)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];
+ cStr = (unsigned char *)[str UTF8String];
if (cStr != NULL && strlen((char*)cStr) > 0)
{
mchar = cStr[0];
mkey = toupper(mchar);
- if ([(NSEvent *)event modifierFlags] & NSCommandKeyMask)
- {
- if (mkey == 'C' || mkey == 'V' || mkey == 'X')
- {
- mchar = 0;
- skipCommand = true;
- }
- }
}
}
}
+ if ([(NSEvent *)event modifierFlags] & NSCommandKeyMask)
+ {
+ if (mkey == 'C' || mkey == 'V' || mkey == 'X')
+ {
+ mchar = 0;
+ skipCommand = true;
+ }
+ }
ievent.EventType = irr::EET_KEY_INPUT_EVENT;
ievent.KeyInput.Key = (irr::EKEY_CODE)mkey;
diff --git a/source/Irrlicht/MacOSX/OSXClipboard.mm b/source/Irrlicht/MacOSX/OSXClipboard.mm
index d549911..1925e80 100644
--- a/source/Irrlicht/MacOSX/OSXClipboard.mm
+++ b/source/Irrlicht/MacOSX/OSXClipboard.mm
@@ -13,7 +13,7 @@
void OSXCopyToClipboard(const char *text)
if ((text != NULL) && (strlen(text) > 0))
{
- str = [NSString stringWithCString:text encoding:NSWindowsCP1252StringEncoding];
+ str = [NSString stringWithUTF8String:text];
board = [NSPasteboard generalPasteboard];
[board declareTypes:[NSArray arrayWithObject:NSStringPboardType] owner:NSApp];
[board setString:str forType:NSStringPboardType];
@@ -30,7 +30,7 @@
char* OSXCopyFromClipboard()
board = [NSPasteboard generalPasteboard];
str = [board stringForType:NSStringPboardType];
if (str != nil)
- result = (char*)[str cStringUsingEncoding:NSWindowsCP1252StringEncoding];
+ result = (char*)[str UTF8String];
return (result);
}
premake/irrlicht/irrlicht.patch
deleted
100644 → 0
View file @
f8496c5c
diff -ur --strip-trailing-cr irrlicht/include/IOSOperator.h irrlicht-fixed/include/IOSOperator.h
--- irrlicht/include/IOSOperator.h 2012-11-03 19:08:34.000000000 +0800
+++ irrlicht-fixed/include/IOSOperator.h 2017-09-09 18:50:04.693119800 +0800
@@ -26,11 +26,11 @@
}
//! Copies text to the clipboard
- virtual void copyToClipboard(const c8* text) const = 0;
+ virtual void copyToClipboard(const c16* text) const = 0;
//! Get text from the clipboard
/** \return Returns 0 if no string is in there. */
- virtual const c8* getTextFromClipboard() const = 0;
+ virtual const c16* getTextFromClipboard() const = 0;
//! Get the processor speed in megahertz
/** \param MHz The integer variable to store the speed in.
diff -ur --strip-trailing-cr irrlicht/include/IrrCompileConfig.h irrlicht-fixed/include/IrrCompileConfig.h
--- irrlicht/include/IrrCompileConfig.h 2016-07-09 13:02:32.000000000 +0800
+++ irrlicht-fixed/include/IrrCompileConfig.h 2017-09-09 18:50:04.695119900 +0800
@@ -233,7 +233,9 @@
disable this feature, the engine behave as before (ansi). This is currently only supported
for Windows based systems. You also have to set #define UNICODE for this to compile.
*/
-//#define _IRR_WCHAR_FILESYSTEM
+#if defined(_IRR_WINDOWS_) && (defined(_UNICODE) || defined(UNICODE))
+#define _IRR_WCHAR_FILESYSTEM
+#endif
#ifdef NO_IRR_WCHAR_FILESYSTEM
#undef _IRR_WCHAR_FILESYSTEM
#endif
diff -ur --strip-trailing-cr irrlicht/include/irrTypes.h irrlicht-fixed/include/irrTypes.h
--- irrlicht/include/irrTypes.h 2012-11-19 18:20:40.000000000 +0800
+++ irrlicht-fixed/include/irrTypes.h 2017-09-09 18:54:19.126672600 +0800
@@ -48,6 +48,9 @@
typedef signed short s16;
#endif
+//! 16 bit character variable.
+/** This is a typedef for wchar_t, it ensures portability of the engine. */
+typedef wchar_t c16;
//! 32 bit unsigned variable.
diff -ur --strip-trailing-cr irrlicht/src/CGUIEditBox.cpp irrlicht-fixed/src/CGUIEditBox.cpp
--- irrlicht/src/CGUIEditBox.cpp 2014-09-17 20:23:10.000000000 +0800
+++ irrlicht-fixed/src/CGUIEditBox.cpp 2017-09-09 18:50:04.709120800 +0800
@@ -287,7 +287,7 @@
const s32 realmbgn = MarkBegin < MarkEnd ? MarkBegin : MarkEnd;
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
- core::stringc s;
+ core::stringw s;
s = Text.subString(realmbgn, realmend - realmbgn).c_str();
Operator->copyToClipboard(s.c_str());
}
@@ -300,7 +300,7 @@
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
// copy
- core::stringc sc;
+ core::stringw sc;
sc = Text.subString(realmbgn, realmend - realmbgn).c_str();
Operator->copyToClipboard(sc.c_str());
@@ -330,16 +330,10 @@
const s32 realmend = MarkBegin < MarkEnd ? MarkEnd : MarkBegin;
// add new character
- const c8* p = Operator->getTextFromClipboard();
+ const c16* p = Operator->getTextFromClipboard();
if (p)
{
- // TODO: we should have such a function in core::string
- size_t lenOld = strlen(p);
- wchar_t *ws = new wchar_t[lenOld + 1];
- size_t len = mbstowcs(ws,p,lenOld);
- ws[len] = 0;
- irr::core::stringw widep(ws);
- delete[] ws;
+ irr::core::stringw widep(p);
if (MarkBegin == MarkEnd)
{
@@ -664,6 +658,16 @@
case KEY_ESCAPE:
case KEY_TAB:
case KEY_SHIFT:
+ case KEY_LSHIFT:
+ case KEY_RSHIFT:
+ case KEY_MENU:
+ case KEY_LMENU:
+ case KEY_RMENU:
+ case KEY_LWIN:
+ case KEY_RWIN:
+ case KEY_CAPITAL:
+ case KEY_NUMLOCK:
+ case KEY_SCROLL:
case KEY_F1:
case KEY_F2:
case KEY_F3:
diff -ur --strip-trailing-cr irrlicht/src/CGUIListBox.cpp irrlicht-fixed/src/CGUIListBox.cpp
--- irrlicht/src/CGUIListBox.cpp 2016-05-26 12:09:34.000000000 +0800
+++ irrlicht-fixed/src/CGUIListBox.cpp 2017-09-09 18:50:04.720121400 +0800
@@ -425,7 +425,7 @@
}
case EMIE_MOUSE_MOVED:
- if (Selecting || MoveOverSelect)
+ if (MoveOverSelect)
{
if (isPointInside(p))
{
diff -ur --strip-trailing-cr irrlicht/src/CIrrDeviceWin32.cpp irrlicht-fixed/src/CIrrDeviceWin32.cpp
--- irrlicht/src/CIrrDeviceWin32.cpp 2016-05-26 12:09:34.000000000 +0800
+++ irrlicht-fixed/src/CIrrDeviceWin32.cpp 2017-09-09 18:56:09.679995900 +0800
@@ -20,6 +20,8 @@
#include "COSOperator.h"
#include "dimension2d.h"
#include "IGUISpriteBank.h"
+#include "IGUIEnvironment.h"
+#include "IGUIElement.h"
#include <winuser.h>
#if defined(_IRR_COMPILE_WITH_JOYSTICK_EVENTS_)
#ifdef _IRR_COMPILE_WITH_DIRECTINPUT_JOYSTICK_
@@ -749,6 +751,26 @@
return 0;
}
+ {
+ dev = getDeviceFromHWnd(hWnd);
+ if (dev)
+ {
+ irr::gui::IGUIElement* ele = dev->getGUIEnvironment()->getFocus();
+ if (!ele || (ele->getType() != irr::gui::EGUIET_EDIT_BOX) || !ele->isEnabled())
+ {
+ HIMC hIMC = ImmGetContext(hWnd);
+ if (hIMC)
+ {
+ ImmNotifyIME(hIMC, NI_COMPOSITIONSTR, CPS_COMPLETE, 0);
+ ImmReleaseContext(hWnd, hIMC);
+ }
+ ImmAssociateContextEx(hWnd, NULL, 0);
+ }
+ else
+ ImmAssociateContextEx(hWnd, NULL, IACE_DEFAULT);
+ }
+ }
+
switch (message)
{
case WM_PAINT:
@@ -773,7 +795,11 @@
event.KeyInput.Key = (irr::EKEY_CODE)wParam;
event.KeyInput.PressedDown = (message==WM_KEYDOWN || message == WM_SYSKEYDOWN);
+#ifdef MAPVK_VSC_TO_VK_EX
+ const UINT MY_MAPVK_VSC_TO_VK_EX = MAPVK_VSC_TO_VK_EX;
+#else
const UINT MY_MAPVK_VSC_TO_VK_EX = 3; // MAPVK_VSC_TO_VK_EX should be in SDK according to MSDN, but isn't in mine.
+#endif
if ( event.KeyInput.Key == irr::KEY_SHIFT )
{
// this will fail on systems before windows NT/2000/XP, not sure _what_ will return there instead.
@@ -904,6 +930,53 @@
KEYBOARD_INPUT_HKL = GetKeyboardLayout(0);
KEYBOARD_INPUT_CODEPAGE = LocaleIdToCodepage( LOWORD(KEYBOARD_INPUT_HKL) );
return 0;
+
+ case WM_IME_STARTCOMPOSITION:
+ {
+ dev = getDeviceFromHWnd(hWnd);
+ irr::gui::IGUIElement* ele = dev->getGUIEnvironment()->getFocus();
+ if (!ele)
+ break;
+ irr::core::position2di pos = ele->getAbsolutePosition().UpperLeftCorner;
+ COMPOSITIONFORM CompForm = { CFS_POINT, { pos.X, pos.Y + ele->getAbsolutePosition().getHeight() } };
+ HIMC hIMC = ImmGetContext(hWnd);
+ ImmSetCompositionWindow(hIMC, &CompForm);
+ ImmReleaseContext(hWnd, hIMC);
+ }
+ break;
+
+ case WM_IME_CHAR:
+ event.EventType = irr::EET_KEY_INPUT_EVENT;
+ event.KeyInput.PressedDown = true;
+#ifdef _UNICODE
+ event.KeyInput.Char = wParam;
+#else
+ BYTE ch[3];
+ if (wParam >> 8) {
+ ch[0] = wParam >> 8;
+ ch[1] = wParam & 0xff;
+ ch[2] = 0;
+ } else {
+ ch[0] = wParam;
+ ch[1] = 0;
+ }
+ WORD unicodeChar;
+ MultiByteToWideChar(
+ KEYBOARD_INPUT_CODEPAGE,
+ MB_PRECOMPOSED, // default
+ (LPCSTR)ch,
+ sizeof(wParam),
+ (WCHAR*)&unicodeChar,
+ 1);
+ event.KeyInput.Char = unicodeChar;
+#endif
+ event.KeyInput.Key = irr::KEY_ACCEPT;
+ event.KeyInput.Shift = 0;
+ event.KeyInput.Control = 0;
+ dev = getDeviceFromHWnd(hWnd);
+ if (dev)
+ dev->postEventFromUser(event);
+ return 0;
}
return DefWindowProc(hWnd, message, wParam, lParam);
}
@@ -1797,8 +1870,8 @@
while (PeekMessage(&msg, NULL, 0, 0, PM_REMOVE))
{
- // No message translation because we don't use WM_CHAR and it would conflict with our
- // deadkey handling.
+ // conflict with deadkey handling.
+ TranslateMessage(&msg);
if (ExternalWindow && msg.hwnd == HWnd)
WndProc(HWnd, msg.message, msg.wParam, msg.lParam);
diff -ur --strip-trailing-cr irrlicht/src/COSOperator.cpp irrlicht-fixed/src/COSOperator.cpp
--- irrlicht/src/COSOperator.cpp 2012-11-03 19:07:52.000000000 +0800
+++ irrlicht-fixed/src/COSOperator.cpp 2017-09-09 18:50:04.715121100 +0800
@@ -52,9 +52,9 @@
//! copies text to the clipboard
-void COSOperator::copyToClipboard(const c8* text) const
+void COSOperator::copyToClipboard(const c16* text) const
{
- if (strlen(text)==0)
+ if (wcslen(text)==0)
return;
// Windows version
@@ -66,15 +66,15 @@
EmptyClipboard();
HGLOBAL clipbuffer;
- char * buffer;
+ wchar_t * buffer;
- clipbuffer = GlobalAlloc(GMEM_DDESHARE, strlen(text)+1);
- buffer = (char*)GlobalLock(clipbuffer);
+ clipbuffer = GlobalAlloc(GMEM_DDESHARE, sizeof(wchar_t) * (wcslen(text) + 1));
+ buffer = (wchar_t*)GlobalLock(clipbuffer);
- strcpy(buffer, text);
+ wcscpy(buffer, text);
GlobalUnlock(clipbuffer);
- SetClipboardData(CF_TEXT, clipbuffer);
+ SetClipboardData(CF_UNICODETEXT, clipbuffer);
CloseClipboard();
// MacOSX version
@@ -93,7 +93,7 @@
//! gets text from the clipboard
//! \return Returns 0 if no string is in there.
-const c8* COSOperator::getTextFromClipboard() const
+const c16* COSOperator::getTextFromClipboard() const
{
#if defined(_IRR_XBOX_PLATFORM_)
return 0;
@@ -101,10 +101,10 @@
if (!OpenClipboard(NULL))
return 0;
- char * buffer = 0;
+ wchar_t * buffer = 0;
- HANDLE hData = GetClipboardData( CF_TEXT );
- buffer = (char*)GlobalLock( hData );
+ HANDLE hData = GetClipboardData( CF_UNICODETEXT );
+ buffer = (wchar_t*)GlobalLock( hData );
GlobalUnlock( hData );
CloseClipboard();
return buffer;
diff -ur --strip-trailing-cr irrlicht/src/COSOperator.h irrlicht-fixed/src/COSOperator.h
--- irrlicht/src/COSOperator.h 2012-11-03 19:08:00.000000000 +0800
+++ irrlicht-fixed/src/COSOperator.h 2017-09-09 18:50:04.717121200 +0800
@@ -27,11 +27,11 @@
virtual const core::stringc& getOperatingSystemVersion() const;
//! copies text to the clipboard
- virtual void copyToClipboard(const c8* text) const;
+ virtual void copyToClipboard(const c16* text) const;
//! gets text from the clipboard
//! \return Returns 0 if no string is in there.
- virtual const c8* getTextFromClipboard() const;
+ virtual const c16* getTextFromClipboard() const;
//! gets the processor speed in megahertz
//! \param Mhz:
premake/irrlicht/premake5.lua
deleted
100644 → 0
View file @
f8496c5c
project
"Irrlicht"
kind
"StaticLib"
includedirs
{
"include"
,
"src"
,
"src/jpeglib"
,
"src/libpng"
,
"src/zlib"
}
defines
{
"_IRR_STATIC_LIB_"
}
exceptionhandling
"Off"
rtti
"Off"
files
{
"src/CCgMaterialRenderer.cpp"
,
"src/CD3D9CgMaterialRenderer.cpp"
,
"src/CDefaultSceneNodeAnimatorFactory.cpp"
,
"src/CDefaultSceneNodeFactory.cpp"
,
"src/CGeometryCreator.cpp"
,
"src/CMeshCache.cpp"
,
"src/CMeshManipulator.cpp"
,
"src/COpenGLCgMaterialRenderer.cpp"
,
"src/CSceneManager.cpp"
,
"src/C3DSMeshFileLoader.cpp"
,
"src/CSMFMeshFileLoader.cpp"
,
"src/CAnimatedMeshHalfLife.cpp"
,
"src/CAnimatedMeshMD2.cpp"
,
"src/CAnimatedMeshMD3.cpp"
,
"src/CB3DMeshFileLoader.cpp"
,
"src/CBSPMeshFileLoader.cpp"
,
"src/CColladaFileLoader.cpp"
,
"src/CCSMLoader.cpp"
,
"src/CDMFLoader.cpp"
,
"src/CIrrMeshFileLoader.cpp"
,
"src/CLMTSMeshFileLoader.cpp"
,
"src/CLWOMeshFileLoader.cpp"
,
"src/CMD2MeshFileLoader.cpp"
,
"src/CMD3MeshFileLoader.cpp"
,
"src/CMS3DMeshFileLoader.cpp"
,
"src/CMY3DMeshFileLoader.cpp"
,
"src/COBJMeshFileLoader.cpp"
,
"src/COCTLoader.cpp"
,
"src/COgreMeshFileLoader.cpp"
,
"src/CPLYMeshFileLoader.cpp"
,
"src/CQ3LevelMesh.cpp"
,
"src/CSkinnedMesh.cpp"
,
"src/CSTLMeshFileLoader.cpp"
,
"src/CXMeshFileLoader.cpp"
,
"src/CAnimatedMeshSceneNode.cpp"
,
"src/CBillboardSceneNode.cpp"
,
"src/CBoneSceneNode.cpp"
,
"src/CCameraSceneNode.cpp"
,
"src/CCubeSceneNode.cpp"
,
"src/CDummyTransformationSceneNode.cpp"
,
"src/CEmptySceneNode.cpp"
,
"src/CLightSceneNode.cpp"
,
"src/CMeshSceneNode.cpp"
,
"src/COctreeSceneNode.cpp"
,
"src/CQuake3ShaderSceneNode.cpp"
,
"src/CShadowVolumeSceneNode.cpp"
,
"src/CSkyBoxSceneNode.cpp"
,
"src/CSkyDomeSceneNode.cpp"
,
"src/CSphereSceneNode.cpp"
,
"src/CTerrainSceneNode.cpp"
,
"src/CTextSceneNode.cpp"
,
"src/CVolumeLightSceneNode.cpp"
,
"src/CWaterSurfaceSceneNode.cpp"
,
"src/CParticleAnimatedMeshSceneNodeEmitter.cpp"
,
"src/CParticleAttractionAffector.cpp"
,
"src/CParticleBoxEmitter.cpp"
,
"src/CParticleCylinderEmitter.cpp"
,
"src/CParticleFadeOutAffector.cpp"
,
"src/CParticleGravityAffector.cpp"
,
"src/CParticleMeshEmitter.cpp"
,
"src/CParticlePointEmitter.cpp"
,
"src/CParticleRingEmitter.cpp"
,
"src/CParticleRotationAffector.cpp"
,
"src/CParticleScaleAffector.cpp"
,
"src/CParticleSphereEmitter.cpp"
,
"src/CParticleSystemSceneNode.cpp"
,
"src/CMetaTriangleSelector.cpp"
,
"src/COctreeTriangleSelector.cpp"
,
"src/CSceneCollisionManager.cpp"
,
"src/CTerrainTriangleSelector.cpp"
,
"src/CTriangleBBSelector.cpp"
,
"src/CTriangleSelector.cpp"
,
"src/CSceneLoaderIrr.cpp"
,
"src/CSceneNodeAnimatorCameraFPS.cpp"
,
"src/CSceneNodeAnimatorCameraMaya.cpp"
,
"src/CSceneNodeAnimatorCollisionResponse.cpp"
,
"src/CSceneNodeAnimatorDelete.cpp"
,
"src/CSceneNodeAnimatorFlyCircle.cpp"
,
"src/CSceneNodeAnimatorFlyStraight.cpp"
,
"src/CSceneNodeAnimatorFollowSpline.cpp"
,
"src/CSceneNodeAnimatorRotation.cpp"
,
"src/CSceneNodeAnimatorTexture.cpp"
,
"src/CColladaMeshWriter.cpp"
,
"src/CIrrMeshWriter.cpp"
,
"src/COBJMeshWriter.cpp"
,
"src/CPLYMeshWriter.cpp"
,
"src/CSTLMeshWriter.cpp"
,
"src/CVideoModeList.cpp"
,
"src/CSoftwareDriver.cpp"
,
"src/CSoftwareTexture.cpp"
,
"src/CTRFlat.cpp"
,
"src/CTRFlatWire.cpp"
,
"src/CTRGouraud.cpp"
,
"src/CTRGouraudWire.cpp"
,
"src/CTRTextureFlat.cpp"
,
"src/CTRTextureFlatWire.cpp"
,
"src/CTRTextureGouraud.cpp"
,
"src/CTRTextureGouraudAdd.cpp"
,
"src/CTRTextureGouraudNoZ.cpp"
,
"src/CTRTextureGouraudWire.cpp"
,
"src/CZBuffer.cpp"
,
"src/COpenGLDriver.cpp"
,
"src/COpenGLExtensionHandler.cpp"
,
"src/COpenGLNormalMapRenderer.cpp"
,
"src/COpenGLParallaxMapRenderer.cpp"
,
"src/COpenGLShaderMaterialRenderer.cpp"
,
"src/COpenGLSLMaterialRenderer.cpp"
,
"src/COpenGLTexture.cpp"
,
"src/CD3D8Driver.cpp"
,
"src/CD3D8NormalMapRenderer.cpp"
,
"src/CD3D8ParallaxMapRenderer.cpp"
,
"src/CD3D8ShaderMaterialRenderer.cpp"
,
"src/CD3D8Texture.cpp"
,
"src/CColorConverter.cpp"
,
"src/CFPSCounter.cpp"
,
"src/CImage.cpp"
,
"src/CNullDriver.cpp"
,
"src/CImageWriterBMP.cpp"
,
"src/CImageWriterJPG.cpp"
,
"src/CImageWriterPCX.cpp"
,
"src/CImageWriterPNG.cpp"
,
"src/CImageWriterPPM.cpp"
,
"src/CImageWriterPSD.cpp"
,
"src/CImageWriterTGA.cpp"
,
"src/CImageLoaderBMP.cpp"
,
"src/CImageLoaderDDS.cpp"
,
"src/CImageLoaderJPG.cpp"
,
"src/CImageLoaderPCX.cpp"
,
"src/CImageLoaderPNG.cpp"
,
"src/CImageLoaderPPM.cpp"
,
"src/CImageLoaderPSD.cpp"
,
"src/CImageLoaderRGB.cpp"
,
"src/CImageLoaderTGA.cpp"
,
"src/CImageLoaderWAL.cpp"
,
"src/CD3D9Driver.cpp"
,
"src/CD3D9HLSLMaterialRenderer.cpp"
,
"src/CD3D9NormalMapRenderer.cpp"
,
"src/CD3D9ParallaxMapRenderer.cpp"
,
"src/CD3D9ShaderMaterialRenderer.cpp"
,
"src/CD3D9Texture.cpp"
,
"src/CBurningShader_Raster_Reference.cpp"
,
"src/CDepthBuffer.cpp"
,
"src/CSoftwareDriver2.cpp"
,
"src/CSoftwareTexture2.cpp"
,
"src/CTRGouraud2.cpp"
,
"src/CTRGouraudAlpha2.cpp"
,
"src/CTRGouraudAlphaNoZ2.cpp"
,
"src/CTRNormalMap.cpp"
,
"src/CTRStencilShadow.cpp"
,
"src/CTRTextureBlend.cpp"
,
"src/CTRTextureDetailMap2.cpp"
,
"src/CTRTextureGouraud2.cpp"
,
"src/CTRTextureGouraudAdd2.cpp"
,
"src/CTRTextureGouraudAddNoZ2.cpp"
,
"src/CTRTextureGouraudAlpha.cpp"
,
"src/CTRTextureGouraudAlphaNoZ.cpp"
,
"src/CTRTextureGouraudNoZ2.cpp"
,
"src/CTRTextureGouraudVertexAlpha2.cpp"
,
"src/CTRTextureLightMap2_Add.cpp"
,
"src/CTRTextureLightMap2_M1.cpp"
,
"src/CTRTextureLightMap2_M2.cpp"
,
"src/CTRTextureLightMap2_M4.cpp"
,
"src/CTRTextureLightMapGouraud2_M4.cpp"
,
"src/CTRTextureWire2.cpp"
,
"src/IBurningShader.cpp"
,
"src/CLogger.cpp"
,
"src/COSOperator.cpp"
,
"src/Irrlicht.cpp"
,
"src/os.cpp"
,
"src/lzma/LzmaDec.c"
,
"src/zlib/adler32.c"
,
"src/zlib/compress.c"
,
"src/zlib/crc32.c"
,
"src/zlib/deflate.c"
,
"src/zlib/inffast.c"
,
"src/zlib/inflate.c"
,
"src/zlib/inftrees.c"
,
"src/zlib/trees.c"
,
"src/zlib/uncompr.c"
,
"src/zlib/zutil.c"
,
"src/jpeglib/jaricom.c"
,
"src/jpeglib/jcapimin.c"
,
"src/jpeglib/jcapistd.c"
,
"src/jpeglib/jcarith.c"
,
"src/jpeglib/jccoefct.c"
,
"src/jpeglib/jccolor.c"
,
"src/jpeglib/jcdctmgr.c"
,
"src/jpeglib/jchuff.c"
,
"src/jpeglib/jcinit.c"
,
"src/jpeglib/jcmainct.c"
,
"src/jpeglib/jcmarker.c"
,
"src/jpeglib/jcmaster.c"
,
"src/jpeglib/jcomapi.c"
,
"src/jpeglib/jcparam.c"
,
"src/jpeglib/jcprepct.c"
,
"src/jpeglib/jcsample.c"
,
"src/jpeglib/jctrans.c"
,
"src/jpeglib/jdapimin.c"
,
"src/jpeglib/jdapistd.c"
,
"src/jpeglib/jdarith.c"
,
"src/jpeglib/jdatadst.c"
,
"src/jpeglib/jdatasrc.c"
,
"src/jpeglib/jdcoefct.c"
,
"src/jpeglib/jdcolor.c"
,
"src/jpeglib/jddctmgr.c"
,
"src/jpeglib/jdhuff.c"
,
"src/jpeglib/jdinput.c"
,
"src/jpeglib/jdmainct.c"
,
"src/jpeglib/jdmarker.c"
,
"src/jpeglib/jdmaster.c"
,
"src/jpeglib/jdmerge.c"
,
"src/jpeglib/jdpostct.c"
,
"src/jpeglib/jdsample.c"
,
"src/jpeglib/jdtrans.c"
,
"src/jpeglib/jerror.c"
,
"src/jpeglib/jfdctflt.c"
,
"src/jpeglib/jfdctfst.c"
,
"src/jpeglib/jfdctint.c"
,
"src/jpeglib/jidctflt.c"
,
"src/jpeglib/jidctfst.c"
,
"src/jpeglib/jidctint.c"
,
"src/jpeglib/jmemmgr.c"
,
"src/jpeglib/jmemnobs.c"
,
"src/jpeglib/jquant1.c"
,
"src/jpeglib/jquant2.c"
,
"src/jpeglib/jutils.c"
,
"src/libpng/png.c"
,
"src/libpng/pngerror.c"
,
"src/libpng/pngget.c"
,
"src/libpng/pngmem.c"
,
"src/libpng/pngpread.c"
,
"src/libpng/pngread.c"
,
"src/libpng/pngrio.c"
,
"src/libpng/pngrtran.c"
,
"src/libpng/pngrutil.c"
,
"src/libpng/pngset.c"
,
"src/libpng/pngtrans.c"
,
"src/libpng/pngwio.c"
,
"src/libpng/pngwrite.c"
,
"src/libpng/pngwtran.c"
,
"src/libpng/pngwutil.c"
,
"src/aesGladman/aescrypt.cpp"
,
"src/aesGladman/aeskey.cpp"
,
"src/aesGladman/aestab.cpp"
,
"src/aesGladman/fileenc.cpp"
,
"src/aesGladman/hmac.cpp"
,
"src/aesGladman/prng.cpp"
,
"src/aesGladman/pwd2key.cpp"
,
"src/aesGladman/sha1.cpp"
,
"src/aesGladman/sha2.cpp"
,
"src/bzip2/blocksort.c"
,
"src/bzip2/bzcompress.c"
,
"src/bzip2/bzlib.c"
,
"src/bzip2/crctable.c"
,
"src/bzip2/decompress.c"
,
"src/bzip2/huffman.c"
,
"src/bzip2/randtable.c"
,
"src/CIrrDeviceConsole.cpp"
,
"src/CIrrDeviceFB.cpp"
,
"src/CIrrDeviceLinux.cpp"
,
"src/CIrrDeviceSDL.cpp"
,
"src/CIrrDeviceStub.cpp"
,
"src/CIrrDeviceWin32.cpp"
,
"src/CIrrDeviceWinCE.cpp"
,
"src/CAttributes.cpp"
,
"src/CFileList.cpp"
,
"src/CFileSystem.cpp"
,
"src/CLimitReadFile.cpp"
,
"src/CMemoryFile.cpp"
,
"src/CMountPointReader.cpp"
,
"src/CNPKReader.cpp"
,
"src/CPakReader.cpp"
,
"src/CReadFile.cpp"
,
"src/CTarReader.cpp"
,
"src/CWADReader.cpp"
,
"src/CWriteFile.cpp"
,
"src/CXMLReader.cpp"
,
"src/CXMLWriter.cpp"
,
"src/CZipReader.cpp"
,
"src/irrXML.cpp"
,
"src/CDefaultGUIElementFactory.cpp"
,
"src/CGUIButton.cpp"
,
"src/CGUICheckbox.cpp"
,
"src/CGUIColorSelectDialog.cpp"
,
"src/CGUIComboBox.cpp"
,
"src/CGUIContextMenu.cpp"
,
"src/CGUIEditBox.cpp"
,
"src/CGUIEnvironment.cpp"
,
"src/CGUIFileOpenDialog.cpp"
,
"src/CGUIFont.cpp"
,
"src/CGUIImage.cpp"
,
"src/CGUIImageList.cpp"
,
"src/CGUIInOutFader.cpp"
,
"src/CGUIListBox.cpp"
,
"src/CGUIMenu.cpp"
,
"src/CGUIMeshViewer.cpp"
,
"src/CGUIMessageBox.cpp"
,
"src/CGUIModalScreen.cpp"
,
"src/CGUIScrollBar.cpp"
,
"src/CGUISkin.cpp"
,
"src/CGUISpinBox.cpp"
,
"src/CGUISpriteBank.cpp"
,
"src/CGUIStaticText.cpp"
,
"src/CGUITabControl.cpp"
,
"src/CGUITable.cpp"
,
"src/CGUIToolBar.cpp"
,
"src/CGUITreeView.cpp"
,
"src/CGUIWindow.cpp"
}
configuration
{
"vs*"
}
includedirs
{
"$(DXSDK_DIR)include"
}
libdirs
{
"$(DXSDK_DIR)Lib/x86"
}
configuration
{
"windows"
}
links
{
"imm32"
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment