Win32 fixes

This commit is contained in:
Daniel Collin 2013-01-04 14:11:38 +01:00
parent 2f668c14d0
commit 027dc6001d
3 changed files with 13 additions and 7 deletions

View File

@ -1022,6 +1022,7 @@ static void onSelectTrack()
static void onInterpolation() static void onInterpolation()
{ {
int idx;
struct track_key newKey; struct track_key newKey;
struct sync_track* track; struct sync_track* track;
struct sync_track** tracks = getTracks(); struct sync_track** tracks = getTracks();
@ -1031,7 +1032,7 @@ static void onInterpolation()
track = tracks[getActiveTrack()]; track = tracks[getActiveTrack()];
int idx = key_idx_floor(track, getRowPos()); idx = key_idx_floor(track, getRowPos());
if (idx < 0) if (idx < 0)
return; return;
@ -1046,6 +1047,8 @@ static void onInterpolation()
static void onEnterCurrentValue() static void onEnterCurrentValue()
{ {
int idx;
struct track_key key;
struct sync_track* track; struct sync_track* track;
struct sync_track** tracks = getTracks(); struct sync_track** tracks = getTracks();
const int rowPos = getRowPos(); const int rowPos = getRowPos();
@ -1059,8 +1062,7 @@ static void onEnterCurrentValue()
if (!track->keys) if (!track->keys)
return; return;
struct track_key key; idx = sync_find_key(track, rowPos);
int idx = sync_find_key(track, rowPos);
if (idx < 0) if (idx < 0)
idx = -idx - 1; idx = -idx - 1;

View File

@ -1,7 +1,11 @@
#pragma once #pragma once
#include <wchar.h>
#ifndef _WIN32 #ifndef _WIN32
#define _T(v) v #define _T(v) v
#else
#define _T(v) L ## v
#endif #endif
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////// ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

View File

@ -180,10 +180,10 @@ static int onKeyDown(WPARAM wParam, LPARAM lParam)
switch (wParam) switch (wParam)
{ {
case VK_LEFT : key = EMGUI_ARROW_LEFT; break; case VK_LEFT : key = EMGUI_KEY_ARROW_LEFT; break;
case VK_UP : key = EMGUI_ARROW_UP; break; case VK_UP : key = EMGUI_KEY_ARROW_UP; break;
case VK_RIGHT : key = EMGUI_ARROW_RIGHT; break; case VK_RIGHT : key = EMGUI_KEY_ARROW_RIGHT; break;
case VK_DOWN : key = EMGUI_ARROW_DOWN; break; case VK_DOWN : key = EMGUI_KEY_ARROW_DOWN; break;
case VK_SPACE : key = ' '; break; case VK_SPACE : key = ' '; break;
default: default: