[DEV] correction for windows compilations
This commit is contained in:
parent
74c9974693
commit
c00e4d3e33
2
build
2
build
@ -1 +1 @@
|
|||||||
Subproject commit 265542cb3d085564fe2b8a813c9ec241a09f9348
|
Subproject commit a17436adc6ffbf05cb9dcda1544f7c91a3357c18
|
2
external/etk
vendored
2
external/etk
vendored
@ -1 +1 @@
|
|||||||
Subproject commit 6fde63610d6ae50c13a1126ab80306bb841e2d52
|
Subproject commit 302f121b2d510199f8603bcd1e1dc87a6e5b947b
|
@ -472,7 +472,7 @@ bool eSystem::Draw(bool displayEveryTime)
|
|||||||
{
|
{
|
||||||
int64_t currentTime = ewol::GetTime();
|
int64_t currentTime = ewol::GetTime();
|
||||||
// this is to prevent the multiple display at the a high frequency ...
|
// this is to prevent the multiple display at the a high frequency ...
|
||||||
#ifndef __PLATFORM__Android
|
#if (!defined(__TARGET_OS__Android) && !defined(__TARGET_OS__Windows))
|
||||||
if(currentTime - previousDisplayTime < 1000000/120) {
|
if(currentTime - previousDisplayTime < 1000000/120) {
|
||||||
usleep(1000);
|
usleep(1000);
|
||||||
return false;
|
return false;
|
||||||
|
@ -171,10 +171,15 @@ int Windows_Run(void);
|
|||||||
*/
|
*/
|
||||||
int guiInterface::main(int argc, const char *argv[])
|
int guiInterface::main(int argc, const char *argv[])
|
||||||
{
|
{
|
||||||
glewInit();
|
GLenum err = glewInit();
|
||||||
|
if (GLEW_OK != err)
|
||||||
|
{
|
||||||
|
/* Problem: glewInit failed, something is seriously wrong. */
|
||||||
|
EWOL_ERROR("Error:" << glewGetErrorString(err));
|
||||||
|
}
|
||||||
if (!glewIsSupported("GL_VERSION_2_0")) {
|
if (!glewIsSupported("GL_VERSION_2_0")) {
|
||||||
fprintf(stderr, "OpenGL 2.0 not available\n");
|
EWOL_ERROR("OpenGL 2.0 not available");
|
||||||
return 1;
|
//return 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (int32_t iii=0; iii<NB_MAX_INPUT; iii++) {
|
for (int32_t iii=0; iii<NB_MAX_INPUT; iii++) {
|
||||||
@ -323,7 +328,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
buttonIsDown = false;
|
buttonIsDown = false;
|
||||||
case WM_KEYDOWN:
|
case WM_KEYDOWN:
|
||||||
{
|
{
|
||||||
uniChar_t tmpChar = 0;
|
etk::UniChar tmpChar = 0;
|
||||||
ewol::keyEvent::keyboard_te keyInput;
|
ewol::keyEvent::keyboard_te keyInput;
|
||||||
switch (wParam) {
|
switch (wParam) {
|
||||||
//case 80: // keypad
|
//case 80: // keypad
|
||||||
@ -392,14 +397,14 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
//case : keyInput = ewol::keyEvent::keyboardContextMenu; break;
|
//case : keyInput = ewol::keyEvent::keyboardContextMenu; break;
|
||||||
case VK_NUMLOCK: keyInput = ewol::keyEvent::keyboardNumLock; guiKeyBoardMode.numLock = buttonIsDown; break;
|
case VK_NUMLOCK: keyInput = ewol::keyEvent::keyboardNumLock; guiKeyBoardMode.numLock = buttonIsDown; break;
|
||||||
case VK_BACK: // DEL
|
case VK_BACK: // DEL
|
||||||
tmpChar = 0x00000008;
|
tmpChar.Set(0x08);
|
||||||
break;
|
break;
|
||||||
// TODO : Really strang, need to understand why ...
|
// TODO : Really strang, need to understand why ...
|
||||||
case 46: // Suppr
|
case 46: // Suppr
|
||||||
tmpChar = 0x0000007F;
|
tmpChar.Set(0x7F);
|
||||||
break;
|
break;
|
||||||
case VK_TAB: // special case for TAB
|
case VK_TAB: // special case for TAB
|
||||||
tmpChar = 0x00000009;
|
tmpChar.Set(0x09);
|
||||||
break;
|
break;
|
||||||
case VK_RETURN: // special case for TAB
|
case VK_RETURN: // special case for TAB
|
||||||
tmpChar = '\n';
|
tmpChar = '\n';
|
||||||
@ -412,7 +417,7 @@ LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
|
|||||||
WCHAR chars[BUFFER_LENGTH];
|
WCHAR chars[BUFFER_LENGTH];
|
||||||
|
|
||||||
ToUnicode(wParam,lParam,kbd,chars,BUFFER_LENGTH,0);
|
ToUnicode(wParam,lParam,kbd,chars,BUFFER_LENGTH,0);
|
||||||
unicode::convertUtf8ToUnicode((char*)chars, tmpChar);
|
tmpChar.SetUtf8((char*)chars);
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user