Fixed compilation of the Qt frontend with latest scroll changes

fixed Qt project compilation with Mingw on Windows
This commit is contained in:
Xawotihs@gmail.com
2012-01-26 23:17:40 +00:00
parent c56d907eb5
commit b9a52ab447
5 changed files with 7 additions and 7 deletions

View File

@@ -85,7 +85,7 @@ enum {
#define BLEND_OPTION_BLEND GU_TFX_BLEND
#endif
#ifdef WIN32
#if (defined WIN32) && (!defined LINUX)
#include <windows.h>
#endif
#if defined(LINUX) || defined(IOS) || defined (ANDROID)

View File

@@ -72,8 +72,8 @@ public:
Q_INVOKABLE qint64 getTick() {
return g_startTimer.elapsed();
};
Q_INVOKABLE void doScroll(int x, int y) {
m_engine->Scroll(x, y);
Q_INVOKABLE void doScroll(int x, int y, int magnitude) {
m_engine->Scroll(x, y, magnitude);
};
int getNominalHeight(){ return SCREEN_HEIGHT;};
int getNominalWidth(){ return SCREEN_WIDTH;};

View File

@@ -333,10 +333,10 @@ void WagicCore::wheelEvent ( QGraphicsSceneWheelEvent * event)
#endif
{
if(event->orientation() == Qt::Vertical)
m_engine->Scroll(0, 3*event->delta());
m_engine->Scroll(0, 3*event->delta(), static_cast<int>(sqrt(9*event->delta()*event->delta())));
else
m_engine->Scroll(3*event->delta(), 0);
m_engine->Scroll(3*event->delta(), 0, static_cast<int>(sqrt(9*event->delta()*event->delta())));
event->accept();
}