Linux compile fixes

This commit is contained in:
baldurk
2014-09-14 16:49:17 +01:00
parent 69fec43309
commit 6f9e8f3002
4 changed files with 12 additions and 13 deletions
+4 -4
View File
@@ -235,14 +235,14 @@ class RenderDoc
void SetFocusKeys(KeyButton *keys, int num)
{
m_FocusKeys.resize(num);
if(keys && num > 0)
memcpy(&m_FocusKeys[0], keys, num*sizeof(KeyButton));
for(int i=0; i < num && keys; i++)
m_FocusKeys[i] = keys[i];
}
void SetCaptureKeys(KeyButton *keys, int num)
{
m_CaptureKeys.resize(num);
if(keys && num > 0)
memcpy(&m_CaptureKeys[0], keys, num*sizeof(KeyButton));
for(int i=0; i < num && keys; i++)
m_CaptureKeys[i] = keys[i];
}
const vector<KeyButton> &GetFocusKeys() { return m_FocusKeys; }
+4 -3
View File
@@ -24,6 +24,7 @@
#include "os/os_specific.h"
#include "api/app/renderdoc_app.h"
#include <time.h>
#include <stdio.h>
@@ -58,14 +59,14 @@ namespace Keyboard
{
}
bool GetKeyState(KeyButton key)
bool GetKeyState(int key)
{
KeySym ks = 0;
if(CurrentXDisplay == NULL) return false;
if(key >= eKey_A && key <= eKey_Z) ks = (int)key;
if(key >= eKey_0 && key <= eKey_9) ks = (int)key;
if(key >= eKey_A && key <= eKey_Z) ks = key;
if(key >= eKey_0 && key <= eKey_9) ks = key;
switch(key)
{
+1 -3
View File
@@ -188,14 +188,12 @@ namespace FileIO
int fclose(FILE *f);
};
enum KeyButton;
namespace Keyboard
{
void Init();
void AddInputWindow(void *wnd);
void RemoveInputWindow(void *wnd);
bool GetKeyState(KeyButton key);
bool GetKeyState(int key);
};
namespace StringFormat
+3 -3
View File
@@ -71,12 +71,12 @@ namespace Keyboard
inputWindows.erase((HWND)wnd);
}
bool GetKeyState(KeyButton key)
bool GetKeyState(int key)
{
int vk = 0;
if(key >= eKey_A && key <= eKey_Z) vk = (int)key;
if(key >= eKey_0 && key <= eKey_9) vk = (int)key;
if(key >= eKey_A && key <= eKey_Z) vk = key;
if(key >= eKey_0 && key <= eKey_9) vk = key;
switch(key)
{