mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-07-19 14:16:46 -06:00
*SDL: Added fixes
git-svn-id: svn://ultimatepp.org/upp/trunk@8722 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
parent
122cc744e5
commit
78084643fe
3 changed files with 11 additions and 9 deletions
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
using namespace Upp;
|
||||
|
||||
#include <SDL/SDLCtrl.h>
|
||||
#include "SDLCtrl.h"
|
||||
|
||||
SDL_Cursor *CursorFromImage(const Image &image) {
|
||||
int width = image.GetWidth();
|
||||
|
|
@ -67,7 +67,7 @@ SDLCtrl::SDLCtrlIn::SDLCtrlIn() {
|
|||
return;
|
||||
}
|
||||
#ifdef PLATFORM_WIN32
|
||||
hwndSDL = long(wmInfo.window);
|
||||
hwndSDL = wmInfo.window;
|
||||
#else
|
||||
wmInfo.info.x11.lock_func();
|
||||
hwnd = long(wmInfo.info.x11.wmwindow);
|
||||
|
|
@ -113,7 +113,7 @@ void SDLCtrl::SDLCtrlIn::Layout() {
|
|||
SetWindowPos(hwnd, NULL, r.left, r.top,
|
||||
r.GetWidth(), r.GetHeight(), SWP_NOACTIVATE|SWP_NOZORDER);
|
||||
}
|
||||
ShowWindow(HWND(hwndSDL), IsVisible() ? SW_SHOW : SW_HIDE);
|
||||
ShowWindow(hwndSDL, IsVisible() ? SW_SHOW : SW_HIDE);
|
||||
#endif
|
||||
if(!CreateScreen())
|
||||
return;
|
||||
|
|
@ -130,8 +130,8 @@ void SDLCtrl::SDLCtrlIn::State(int reason) {
|
|||
CloseHWND();
|
||||
HWND phwnd = GetTopCtrl()->GetHWND();
|
||||
if(phwnd) {
|
||||
hwnd = HWND(hwndSDL);
|
||||
SetParent(HWND(hwndSDL), phwnd);
|
||||
hwnd = hwndSDL;
|
||||
SetParent(hwndSDL, phwnd);
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
@ -144,5 +144,5 @@ void SDLCtrl::SDLCtrlIn::State(int reason) {
|
|||
void SDLCtrl::SDLCtrlIn::SetError(String str) {
|
||||
if (!strError.IsEmpty())
|
||||
strError << "\n";
|
||||
strError << ToUpper(str[0]) + DeQtfLf(str.Mid(1));
|
||||
strError << InitCaps(str);
|
||||
}
|
||||
|
|
@ -1,7 +1,7 @@
|
|||
#ifndef _SDLCtrl_h_
|
||||
#define _SDLCtrl_h_
|
||||
|
||||
#include <SDL/SDLWrapper.h>
|
||||
#include "SDLWrapper.h"
|
||||
|
||||
inline bool Odd_(int val) {return val%2;}
|
||||
|
||||
|
|
@ -58,7 +58,7 @@ protected:
|
|||
class SDLCtrl : public Ctrl {
|
||||
typedef SDLCtrl CLASSNAME;
|
||||
class SDLCtrlIn : public DHCtrl, public SDLSurface {
|
||||
typedef SDLCtrl CLASSNAME;
|
||||
typedef SDLCtrlIn CLASSNAME;
|
||||
public:
|
||||
SDLCtrlIn();
|
||||
~SDLCtrlIn();
|
||||
|
|
@ -70,7 +70,7 @@ typedef SDLCtrl CLASSNAME;
|
|||
#ifdef PLATFORM_POSIX
|
||||
XDisplay *display;
|
||||
#else
|
||||
long hwndSDL;
|
||||
HWND hwndSDL;
|
||||
#endif
|
||||
int videoflags;
|
||||
int bpp;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@
|
|||
|
||||
#undef main
|
||||
|
||||
#ifndef INT64_C
|
||||
#define INT64_C(val) val##LL
|
||||
#define UINT64_C(val) val##ULL
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue