mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-03-09 15:30:41 +00:00
merged numerous changes from upstream
This commit is contained in:
commit
d3956cb532
50 changed files with 914 additions and 363 deletions
|
|
@ -22,7 +22,7 @@
|
|||
|
||||
#include "platform/platform.h"
|
||||
#include "console/console.h"
|
||||
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
#include "SDL.h"
|
||||
#include "windowManager/sdl/sdlWindow.h"
|
||||
|
||||
|
|
@ -36,7 +36,52 @@ bool Platform::displaySplashWindow( String path )
|
|||
if(path.isEmpty())
|
||||
return false;
|
||||
|
||||
gSplashImage = SDL_LoadBMP(path);
|
||||
Torque::Path iconPath = Torque::Path(path);
|
||||
|
||||
if (iconPath.getExtension() == String("bmp"))
|
||||
{
|
||||
Con::errorf("Unable to use bmp format images for the splash screen. Please use a different format.");
|
||||
return false;
|
||||
}
|
||||
|
||||
Resource<GBitmap> img = GBitmap::load(iconPath);
|
||||
if (img != NULL)
|
||||
{
|
||||
U32 pitch;
|
||||
U32 width = img->getWidth();
|
||||
bool hasAlpha = img->getHasTransparency();
|
||||
U32 depth;
|
||||
|
||||
if (hasAlpha)
|
||||
{
|
||||
pitch = 4 * width;
|
||||
depth = 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
pitch = 3 * width;
|
||||
depth = 24;
|
||||
}
|
||||
|
||||
Uint32 rmask, gmask, bmask, amask;
|
||||
if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
|
||||
{
|
||||
S32 shift = hasAlpha ? 8 : 0;
|
||||
rmask = 0xff000000 >> shift;
|
||||
gmask = 0x00ff0000 >> shift;
|
||||
bmask = 0x0000ff00 >> shift;
|
||||
amask = 0x000000ff >> shift;
|
||||
}
|
||||
else
|
||||
{
|
||||
rmask = 0x000000ff;
|
||||
gmask = 0x0000ff00;
|
||||
bmask = 0x00ff0000;
|
||||
amask = hasAlpha ? 0xff000000 : 0;
|
||||
}
|
||||
|
||||
gSplashImage = SDL_CreateRGBSurfaceFrom(img->getAddress(0, 0), img->getWidth(), img->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
|
||||
}
|
||||
|
||||
//now the pop-up window
|
||||
if (gSplashImage)
|
||||
|
|
@ -53,7 +98,7 @@ bool Platform::displaySplashWindow( String path )
|
|||
SDL_RenderPresent(gSplashRenderer);
|
||||
}
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool Platform::closeSplashWindow()
|
||||
|
|
|
|||
|
|
@ -51,23 +51,41 @@ namespace
|
|||
{
|
||||
U32 ret = 0;
|
||||
|
||||
if(mod & KMOD_LSHIFT)
|
||||
ret |= IM_LSHIFT;
|
||||
if (mod & KMOD_LSHIFT)
|
||||
{
|
||||
ret |= SI_LSHIFT;
|
||||
ret |= SI_SHIFT;
|
||||
}
|
||||
|
||||
if(mod & KMOD_RSHIFT)
|
||||
ret |= IM_RSHIFT;
|
||||
if (mod & KMOD_RSHIFT)
|
||||
{
|
||||
ret |= SI_RSHIFT;
|
||||
ret |= SI_SHIFT;
|
||||
}
|
||||
|
||||
if(mod & KMOD_LCTRL)
|
||||
ret |= IM_LCTRL;
|
||||
if (mod & KMOD_LCTRL)
|
||||
{
|
||||
ret |= SI_LCTRL;
|
||||
ret |= SI_CTRL;
|
||||
}
|
||||
|
||||
if(mod & KMOD_RCTRL)
|
||||
ret |= IM_RCTRL;
|
||||
if (mod & KMOD_RCTRL)
|
||||
{
|
||||
ret |= SI_RCTRL;
|
||||
ret |= SI_CTRL;
|
||||
}
|
||||
|
||||
if(mod & KMOD_LALT)
|
||||
ret |= IM_LALT;
|
||||
if (mod & KMOD_LALT)
|
||||
{
|
||||
ret |= SI_LALT;
|
||||
ret |= SI_ALT;
|
||||
}
|
||||
|
||||
if(mod & KMOD_RALT)
|
||||
ret |= IM_RALT;
|
||||
if (mod & KMOD_RALT)
|
||||
{
|
||||
ret |= SI_RALT;
|
||||
ret |= SI_ALT;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -86,37 +104,37 @@ mShouldLockMouse(false),
|
|||
mSuppressReset(false),
|
||||
mMenuHandle(NULL)
|
||||
{
|
||||
mCursorController = new PlatformCursorControllerSDL( this );
|
||||
mCursorController = new PlatformCursorControllerSDL( this );
|
||||
|
||||
mVideoMode.bitDepth = 32;
|
||||
mVideoMode.fullScreen = false;
|
||||
mVideoMode.refreshRate = 60;
|
||||
mVideoMode.resolution.set(800,600);
|
||||
mVideoMode.bitDepth = 32;
|
||||
mVideoMode.fullScreen = false;
|
||||
mVideoMode.refreshRate = 60;
|
||||
mVideoMode.resolution.set(800,600);
|
||||
}
|
||||
|
||||
PlatformWindowSDL::~PlatformWindowSDL()
|
||||
{
|
||||
// delete our sdl handle..
|
||||
SDL_DestroyWindow(mWindowHandle);
|
||||
// delete our sdl handle..
|
||||
SDL_DestroyWindow(mWindowHandle);
|
||||
|
||||
// unlink ourselves from the window list...
|
||||
AssertFatal(mOwningManager, "PlatformWindowSDL::~PlatformWindowSDL - orphan window, cannot unlink!");
|
||||
mOwningManager->unlinkWindow(this);
|
||||
// unlink ourselves from the window list...
|
||||
AssertFatal(mOwningManager, "PlatformWindowSDL::~PlatformWindowSDL - orphan window, cannot unlink!");
|
||||
mOwningManager->unlinkWindow(this);
|
||||
}
|
||||
|
||||
GFXDevice * PlatformWindowSDL::getGFXDevice()
|
||||
{
|
||||
return mDevice;
|
||||
return mDevice;
|
||||
}
|
||||
|
||||
GFXWindowTarget * PlatformWindowSDL::getGFXTarget()
|
||||
{
|
||||
return mTarget;
|
||||
return mTarget;
|
||||
}
|
||||
|
||||
const GFXVideoMode & PlatformWindowSDL::getVideoMode()
|
||||
{
|
||||
return mVideoMode;
|
||||
return mVideoMode;
|
||||
}
|
||||
|
||||
void* PlatformWindowSDL::getSystemWindow(const WindowSystem system)
|
||||
|
|
@ -144,41 +162,41 @@ void PlatformWindowSDL::setVideoMode( const GFXVideoMode &mode )
|
|||
mVideoMode = mode;
|
||||
mSuppressReset = true;
|
||||
|
||||
// Set our window to have the right style based on the mode
|
||||
// Set our window to have the right style based on the mode
|
||||
if(mode.fullScreen && !Platform::getWebDeployment() && !mOffscreenRender)
|
||||
{
|
||||
{
|
||||
setSize(mode.resolution);
|
||||
|
||||
SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN);
|
||||
|
||||
// When switching to Fullscreen, reset device after setting style
|
||||
if(mTarget.isValid())
|
||||
mTarget->resetMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
if(mTarget.isValid())
|
||||
mTarget->resetMode();
|
||||
}
|
||||
else
|
||||
{
|
||||
// Reset device *first*, so that when we call setSize() and let it
|
||||
// access the monitor settings, it won't end up with our fullscreen
|
||||
// geometry that is just about to change.
|
||||
// access the monitor settings, it won't end up with our fullscreen
|
||||
// geometry that is just about to change.
|
||||
|
||||
if(mTarget.isValid())
|
||||
mTarget->resetMode();
|
||||
if(mTarget.isValid())
|
||||
mTarget->resetMode();
|
||||
|
||||
if (!mOffscreenRender)
|
||||
{
|
||||
SDL_SetWindowFullscreen( mWindowHandle, 0);
|
||||
SDL_SetWindowFullscreen( mWindowHandle, 0);
|
||||
}
|
||||
|
||||
setSize(mode.resolution);
|
||||
centerWindow();
|
||||
}
|
||||
}
|
||||
|
||||
mSuppressReset = false;
|
||||
mSuppressReset = false;
|
||||
}
|
||||
|
||||
bool PlatformWindowSDL::clearFullscreen()
|
||||
{
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PlatformWindowSDL::isFullscreen()
|
||||
|
|
@ -192,32 +210,32 @@ bool PlatformWindowSDL::isFullscreen()
|
|||
|
||||
void PlatformWindowSDL::_setFullscreen(const bool fullscreen)
|
||||
{
|
||||
if( isFullscreen() )
|
||||
return;
|
||||
if( isFullscreen() )
|
||||
return;
|
||||
|
||||
if(fullscreen && !mOffscreenRender)
|
||||
{
|
||||
Con::printf("PlatformWindowSDL::setFullscreen (full) enter");
|
||||
SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
Con::printf("PlatformWindowSDL::setFullscreen (windowed) enter");
|
||||
if(fullscreen && !mOffscreenRender)
|
||||
{
|
||||
Con::printf("PlatformWindowSDL::setFullscreen (full) enter");
|
||||
SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN);
|
||||
}
|
||||
else
|
||||
{
|
||||
Con::printf("PlatformWindowSDL::setFullscreen (windowed) enter");
|
||||
if (!mOffscreenRender)
|
||||
{
|
||||
SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
SDL_SetWindowFullscreen( mWindowHandle, SDL_WINDOW_FULLSCREEN_DESKTOP);
|
||||
}
|
||||
|
||||
setSize(mVideoMode.resolution);
|
||||
|
||||
}
|
||||
Con::printf("PlatformWindowSDL::setFullscreen exit");
|
||||
}
|
||||
Con::printf("PlatformWindowSDL::setFullscreen exit");
|
||||
}
|
||||
|
||||
bool PlatformWindowSDL::setCaption( const char *cap )
|
||||
{
|
||||
SDL_SetWindowTitle(mWindowHandle, cap);
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
const char * PlatformWindowSDL::getCaption()
|
||||
|
|
@ -232,45 +250,45 @@ void PlatformWindowSDL::setFocus()
|
|||
|
||||
void PlatformWindowSDL::setClientExtent( const Point2I newExtent )
|
||||
{
|
||||
Point2I oldExtent = getClientExtent();
|
||||
if (oldExtent == newExtent)
|
||||
return;
|
||||
Point2I oldExtent = getClientExtent();
|
||||
if (oldExtent == newExtent)
|
||||
return;
|
||||
|
||||
SDL_SetWindowSize(mWindowHandle, newExtent.x, newExtent.y);
|
||||
}
|
||||
|
||||
const Point2I PlatformWindowSDL::getClientExtent()
|
||||
{
|
||||
// Fetch Client Rect from Windows
|
||||
// Fetch Client Rect from Windows
|
||||
Point2I size;
|
||||
SDL_GetWindowSize(mWindowHandle, &size.x, &size.y);
|
||||
SDL_GetWindowSize(mWindowHandle, &size.x, &size.y);
|
||||
|
||||
return size;
|
||||
return size;
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::setBounds( const RectI &newBounds )
|
||||
{
|
||||
// TODO SDL
|
||||
// TODO SDL
|
||||
}
|
||||
|
||||
const RectI PlatformWindowSDL::getBounds() const
|
||||
{
|
||||
// TODO SDL
|
||||
return RectI(0, 0, 0, 0);
|
||||
// TODO SDL
|
||||
return RectI(0, 0, 0, 0);
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::setPosition( const Point2I newPosition )
|
||||
{
|
||||
SDL_SetWindowPosition( mWindowHandle, newPosition.x, newPosition.y );
|
||||
SDL_SetWindowPosition( mWindowHandle, newPosition.x, newPosition.y );
|
||||
}
|
||||
|
||||
const Point2I PlatformWindowSDL::getPosition()
|
||||
{
|
||||
Point2I position;
|
||||
SDL_GetWindowPosition( mWindowHandle, &position.x, &position.y );
|
||||
Point2I position;
|
||||
SDL_GetWindowPosition( mWindowHandle, &position.x, &position.y );
|
||||
|
||||
// Return position
|
||||
return position;
|
||||
// Return position
|
||||
return position;
|
||||
}
|
||||
|
||||
Point2I PlatformWindowSDL::clientToScreen( const Point2I& pos )
|
||||
|
|
@ -293,7 +311,7 @@ void PlatformWindowSDL::centerWindow()
|
|||
SDL_GetWindowSize(mWindowHandle, &sizeX, &sizeY);
|
||||
|
||||
SDL_DisplayMode mode;
|
||||
SDL_GetDesktopDisplayMode(0, &mode);
|
||||
SDL_GetDesktopDisplayMode(0, &mode);
|
||||
|
||||
U32 posX = (mode.w/2) - (sizeX/2);
|
||||
U32 posY = (mode.h/2) - (sizeY/2);
|
||||
|
|
@ -307,21 +325,21 @@ bool PlatformWindowSDL::setSize( const Point2I &newSize )
|
|||
|
||||
// Let GFX get an update about the new resolution
|
||||
if (mTarget.isValid())
|
||||
mTarget->resetMode();
|
||||
mTarget->resetMode();
|
||||
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
|
||||
bool PlatformWindowSDL::isOpen()
|
||||
{
|
||||
return mWindowHandle;
|
||||
return mWindowHandle;
|
||||
}
|
||||
|
||||
bool PlatformWindowSDL::isVisible()
|
||||
{
|
||||
// Is the window open and visible, ie. not minimized?
|
||||
if(!mWindowHandle)
|
||||
return false;
|
||||
// Is the window open and visible, ie. not minimized?
|
||||
if(!mWindowHandle)
|
||||
return false;
|
||||
|
||||
if (mOffscreenRender)
|
||||
return true;
|
||||
|
|
@ -330,7 +348,7 @@ bool PlatformWindowSDL::isVisible()
|
|||
if( flags & SDL_WINDOW_SHOWN)
|
||||
return true;
|
||||
|
||||
return false;
|
||||
return false;
|
||||
}
|
||||
|
||||
bool PlatformWindowSDL::isFocused()
|
||||
|
|
@ -371,7 +389,7 @@ bool PlatformWindowSDL::isMaximized()
|
|||
|
||||
WindowId PlatformWindowSDL::getWindowId()
|
||||
{
|
||||
return mWindowId;
|
||||
return mWindowId;
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::minimize()
|
||||
|
|
@ -379,7 +397,7 @@ void PlatformWindowSDL::minimize()
|
|||
if (mOffscreenRender)
|
||||
return;
|
||||
|
||||
SDL_MinimizeWindow( mWindowHandle );
|
||||
SDL_MinimizeWindow( mWindowHandle );
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::maximize()
|
||||
|
|
@ -387,7 +405,7 @@ void PlatformWindowSDL::maximize()
|
|||
if (mOffscreenRender)
|
||||
return;
|
||||
|
||||
SDL_MaximizeWindow( mWindowHandle );
|
||||
SDL_MaximizeWindow( mWindowHandle );
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::restore()
|
||||
|
|
@ -395,7 +413,7 @@ void PlatformWindowSDL::restore()
|
|||
if (mOffscreenRender)
|
||||
return;
|
||||
|
||||
SDL_RestoreWindow( mWindowHandle );
|
||||
SDL_RestoreWindow( mWindowHandle );
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::hide()
|
||||
|
|
@ -403,7 +421,7 @@ void PlatformWindowSDL::hide()
|
|||
if (mOffscreenRender)
|
||||
return;
|
||||
|
||||
SDL_HideWindow( mWindowHandle );
|
||||
SDL_HideWindow( mWindowHandle );
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::show()
|
||||
|
|
@ -411,17 +429,17 @@ void PlatformWindowSDL::show()
|
|||
if (mOffscreenRender)
|
||||
return;
|
||||
|
||||
SDL_ShowWindow( mWindowHandle );
|
||||
SDL_ShowWindow( mWindowHandle );
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::close()
|
||||
{
|
||||
delete this;
|
||||
delete this;
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::defaultRender()
|
||||
{
|
||||
// TODO SDL
|
||||
// TODO SDL
|
||||
}
|
||||
|
||||
void PlatformWindowSDL::_triggerMouseLocationNotify(const SDL_Event& evt)
|
||||
|
|
@ -597,7 +615,7 @@ void PlatformWindowSDL::setMouseLocked( bool enable )
|
|||
if (mOffscreenRender)
|
||||
return;
|
||||
|
||||
mMouseLocked = enable;
|
||||
mMouseLocked = enable;
|
||||
|
||||
SDL_SetWindowGrab( mWindowHandle, SDL_bool(enable) );
|
||||
SDL_SetRelativeMouseMode( SDL_bool(enable) );
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@
|
|||
#include "gfx/gfxDevice.h"
|
||||
#include "core/util/journal/process.h"
|
||||
#include "core/strings/unicode.h"
|
||||
#include "gfx/bitmap/gBitmap.h"
|
||||
|
||||
#include "SDL.h"
|
||||
|
||||
|
|
@ -165,6 +166,59 @@ PlatformWindow *PlatformWindowManagerSDL::createWindow(GFXDevice *device, const
|
|||
window->mOwningManager = this;
|
||||
mWindowMap[ window->mWindowId ] = window;
|
||||
|
||||
//Now, fetch our window icon, if any
|
||||
Torque::Path iconPath = Torque::Path(Con::getVariable( "$Core::windowIcon" ));
|
||||
|
||||
if (iconPath.getExtension() == String("bmp"))
|
||||
{
|
||||
Con::errorf("Unable to use bmp format images for the window icon. Please use a different format.");
|
||||
}
|
||||
else
|
||||
{
|
||||
Resource<GBitmap> img = GBitmap::load(iconPath);
|
||||
if (img != NULL)
|
||||
{
|
||||
U32 pitch;
|
||||
U32 width = img->getWidth();
|
||||
bool hasAlpha = img->getHasTransparency();
|
||||
U32 depth;
|
||||
|
||||
if (hasAlpha)
|
||||
{
|
||||
pitch = 4 * width;
|
||||
depth = 32;
|
||||
}
|
||||
else
|
||||
{
|
||||
pitch = 3 * width;
|
||||
depth = 24;
|
||||
}
|
||||
|
||||
Uint32 rmask, gmask, bmask, amask;
|
||||
if (SDL_BYTEORDER == SDL_BIG_ENDIAN)
|
||||
{
|
||||
S32 shift = hasAlpha ? 8 : 0;
|
||||
rmask = 0xff000000 >> shift;
|
||||
gmask = 0x00ff0000 >> shift;
|
||||
bmask = 0x0000ff00 >> shift;
|
||||
amask = 0x000000ff >> shift;
|
||||
}
|
||||
else
|
||||
{
|
||||
rmask = 0x000000ff;
|
||||
gmask = 0x0000ff00;
|
||||
bmask = 0x00ff0000;
|
||||
amask = hasAlpha ? 0xff000000 : 0;
|
||||
}
|
||||
|
||||
SDL_Surface* iconSurface = SDL_CreateRGBSurfaceFrom(img->getAddress(0, 0), img->getWidth(), img->getHeight(), depth, pitch, rmask, gmask, bmask, amask);
|
||||
|
||||
SDL_SetWindowIcon(window->mWindowHandle, iconSurface);
|
||||
|
||||
SDL_FreeSurface(iconSurface);
|
||||
}
|
||||
}
|
||||
|
||||
if(device)
|
||||
{
|
||||
window->mDevice = device;
|
||||
|
|
|
|||
|
|
@ -95,7 +95,7 @@ void WindowInputGenerator::generateInputEvent( InputEventInfo &inputEvent )
|
|||
{
|
||||
const AccKeyMap &acc = mAcceleratorMap[i];
|
||||
if (!mWindow->getKeyboardTranslation() &&
|
||||
(acc.modifier & inputEvent.modifier || (acc.modifier == 0 && inputEvent.modifier == 0))
|
||||
((acc.modifier == inputEvent.modifier && acc.modifier != 0) || (acc.modifier == 0 && inputEvent.modifier == 0))
|
||||
&& acc.keyCode == inputEvent.objInst)
|
||||
{
|
||||
Con::evaluatef(acc.cmd);
|
||||
|
|
@ -145,7 +145,11 @@ void WindowInputGenerator::handleMouseMove( WindowId did, U32 modifier, S32 x, S
|
|||
event.deviceType = MouseDeviceType;
|
||||
event.deviceInst = 0;
|
||||
event.objType = SI_AXIS;
|
||||
event.modifier = convertModifierBits(modifier);
|
||||
#ifdef TORQUE_SDL
|
||||
event.modifier = modifier;
|
||||
#else
|
||||
event.modifier = convertModifierBits(modifier);
|
||||
#endif
|
||||
event.ascii = 0;
|
||||
|
||||
// Generate delta movement along each axis
|
||||
|
|
@ -231,7 +235,11 @@ void WindowInputGenerator::handleMouseButton( WindowId did, U32 modifiers, U32 a
|
|||
event.deviceInst = 0;
|
||||
event.objType = SI_BUTTON;
|
||||
event.objInst = (InputObjectInstances)(KEY_BUTTON0 + button);
|
||||
event.modifier = convertModifierBits(modifiers);
|
||||
#ifdef TORQUE_SDL
|
||||
event.modifier = modifiers;
|
||||
#else
|
||||
event.modifier = convertModifierBits(modifiers);
|
||||
#endif
|
||||
event.ascii = 0;
|
||||
event.action = (action==IA_MAKE) ? SI_MAKE : SI_BREAK;
|
||||
event.fValue = (action==IA_MAKE) ? 1.0 : 0.0;
|
||||
|
|
@ -248,7 +256,11 @@ void WindowInputGenerator::handleMouseWheel( WindowId did, U32 modifiers, S32 wh
|
|||
event.deviceType = MouseDeviceType;
|
||||
event.deviceInst = 0;
|
||||
event.objType = SI_AXIS;
|
||||
event.modifier = convertModifierBits(modifiers);
|
||||
#ifdef TORQUE_SDL
|
||||
event.modifier = modifiers;
|
||||
#else
|
||||
event.modifier = convertModifierBits(modifiers);
|
||||
#endif
|
||||
event.ascii = 0;
|
||||
event.action = SI_MOVE;
|
||||
|
||||
|
|
@ -281,7 +293,11 @@ void WindowInputGenerator::handleCharInput( WindowId did, U32 modifier, U16 key
|
|||
event.deviceInst = 0;
|
||||
event.objType = SI_KEY;
|
||||
event.objInst = KEY_NULL;
|
||||
event.modifier = convertModifierBits(modifier);
|
||||
#ifdef TORQUE_SDL
|
||||
event.modifier = modifier;
|
||||
#else
|
||||
event.modifier = convertModifierBits(modifier);
|
||||
#endif
|
||||
event.ascii = key;
|
||||
event.action = SI_MAKE;
|
||||
event.fValue = 1.0;
|
||||
|
|
@ -303,7 +319,11 @@ void WindowInputGenerator::handleKeyboard( WindowId did, U32 modifier, U32 actio
|
|||
event.deviceInst = 0;
|
||||
event.objType = SI_KEY;
|
||||
event.objInst = (InputObjectInstances)key;
|
||||
event.modifier = convertModifierBits(modifier);
|
||||
#ifdef TORQUE_SDL
|
||||
event.modifier = modifier;
|
||||
#else
|
||||
event.modifier = convertModifierBits(modifier);
|
||||
#endif
|
||||
event.ascii = 0;
|
||||
|
||||
switch(action)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue