- renamed synrgyhk.dll to synwinhk.dll and moved lib code to separate folder.

- removed game device support (fallen into significant disrepair).
This commit is contained in:
jerry
2013-08-02 13:21:06 +00:00
parent 289f1ff71f
commit dab838ed14
77 changed files with 91 additions and 2859 deletions

View File

@@ -76,10 +76,6 @@ public:
virtual void mouseMove(SInt32 xAbs, SInt32 yAbs) = 0;
virtual void mouseRelativeMove(SInt32 xRel, SInt32 yRel) = 0;
virtual void mouseWheel(SInt32 xDelta, SInt32 yDelta) = 0;
virtual void gameDeviceButtons(GameDeviceID id, GameDeviceButton buttons) = 0;
virtual void gameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2) = 0;
virtual void gameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2) = 0;
virtual void gameDeviceTimingReq() = 0;
virtual void screensaver(bool activate) = 0;
virtual void resetOptions() = 0;
virtual void setOptions(const COptionsList& options) = 0;

View File

@@ -84,10 +84,6 @@ public:
virtual void screensaver(bool activate) = 0;
virtual void resetOptions() = 0;
virtual void setOptions(const COptionsList& options) = 0;
virtual void gameDeviceButtons(GameDeviceID id, GameDeviceButton buttons) = 0;
virtual void gameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2) = 0;
virtual void gameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2) = 0;
virtual void gameDeviceTimingReq() = 0;
virtual void cryptoIv(const UInt8* iv) = 0;
virtual void fileChunkSending(UInt8 mark, char* data, size_t dataSize) = 0;

View File

@@ -358,34 +358,6 @@ CClientProxy1_0::mouseWheel(SInt32, SInt32 yDelta)
CProtocolUtil::writef(getStream(), kMsgDMouseWheel1_0, yDelta);
}
void
CClientProxy1_0::gameDeviceButtons(GameDeviceID, GameDeviceButton)
{
// ignore -- not supported in protocol 1.0
LOG((CLOG_DEBUG "gameDeviceButtons not supported"));
}
void
CClientProxy1_0::gameDeviceSticks(GameDeviceID, SInt16, SInt16, SInt16, SInt16)
{
// ignore -- not supported in protocol 1.0
LOG((CLOG_DEBUG "gameDeviceSticks not supported"));
}
void
CClientProxy1_0::gameDeviceTriggers(GameDeviceID, UInt8, UInt8)
{
// ignore -- not supported in protocol 1.0
LOG((CLOG_DEBUG "gameDeviceTriggers not supported"));
}
void
CClientProxy1_0::gameDeviceTimingReq()
{
// ignore -- not supported in protocol 1.0
LOG((CLOG_DEBUG "gameDeviceTimingReq not supported"));
}
void
CClientProxy1_0::cryptoIv(const UInt8* iv)
{

View File

@@ -59,10 +59,6 @@ public:
virtual void screensaver(bool activate);
virtual void resetOptions();
virtual void setOptions(const COptionsList& options);
virtual void gameDeviceButtons(GameDeviceID id, GameDeviceButton buttons);
virtual void gameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2);
virtual void gameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2);
virtual void gameDeviceTimingReq();
virtual void cryptoIv(const UInt8* iv);
virtual void fileChunkSending(UInt8 mark, char* data, size_t dataSize);

View File

@@ -40,34 +40,6 @@ CClientProxy1_4::~CClientProxy1_4()
{
}
void
CClientProxy1_4::gameDeviceButtons(GameDeviceID id, GameDeviceButton buttons)
{
LOG((CLOG_DEBUG2 "send game device buttons to \"%s\" id=%d buttons=%d", getName().c_str(), id, buttons));
CProtocolUtil::writef(getStream(), kMsgDGameButtons, id, buttons);
}
void
CClientProxy1_4::gameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2)
{
LOG((CLOG_DEBUG2 "send game device sticks to \"%s\" id=%d s1=%+d,%+d s2=%+d,%+d", getName().c_str(), id, x1, y1, x2, y2));
CProtocolUtil::writef(getStream(), kMsgDGameSticks, id, x1, y1, x2, y2);
}
void
CClientProxy1_4::gameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2)
{
LOG((CLOG_DEBUG2 "send game device triggers to \"%s\" id=%d t1=%d t2=%d", getName().c_str(), id, t1, t2));
CProtocolUtil::writef(getStream(), kMsgDGameTriggers, id, t1, t2);
}
void
CClientProxy1_4::gameDeviceTimingReq()
{
LOG((CLOG_DEBUG2 "send game device timing request to \"%s\"", getName().c_str()));
CProtocolUtil::writef(getStream(), kMsgCGameTimingReq);
}
void
CClientProxy1_4::keyDown(KeyID key, KeyModifierMask mask, KeyButton button)
{
@@ -108,47 +80,3 @@ CClientProxy1_4::cryptoIv()
// the client won't be able to decrypt the new IV.
cryptoStream->setEncryptIv(iv);
}
bool
CClientProxy1_4::parseMessage(const UInt8* code)
{
// process message
if (memcmp(code, kMsgCGameTimingResp, 4) == 0) {
gameDeviceTimingResp();
}
else if (memcmp(code, kMsgDGameFeedback, 4) == 0) {
gameDeviceFeedback();
}
else {
return CClientProxy1_3::parseMessage(code);
}
return true;
}
void
CClientProxy1_4::gameDeviceFeedback()
{
// parse
GameDeviceID id;
UInt16 m1, m2;
CProtocolUtil::readf(getStream(), kMsgDGameFeedback + 4, &id, &m1, &m2);
LOG((CLOG_DEBUG2 "recv game device feedback id=%d m1=%d m2=%d", id, m1, m2));
// forward
m_server->gameDeviceFeedback(id, m1, m2);
}
void
CClientProxy1_4::gameDeviceTimingResp()
{
// parse
UInt16 freq;
CProtocolUtil::readf(getStream(), kMsgCGameTimingResp + 4, &freq);
LOG((CLOG_DEBUG2 "recv game device timing response freq=%dms", freq));
// forward
m_server->gameDeviceTimingResp(freq);
}

View File

@@ -19,7 +19,6 @@
#pragma once
#include "CClientProxy1_3.h"
#include "GameDeviceTypes.h"
class CServer;
@@ -38,10 +37,6 @@ public:
//@}
// IClient overrides
virtual void gameDeviceButtons(GameDeviceID id, GameDeviceButton buttons);
virtual void gameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2);
virtual void gameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2);
virtual void gameDeviceTimingReq();
virtual void keyDown(KeyID key, KeyModifierMask mask, KeyButton button);
virtual void keyRepeat(KeyID key, KeyModifierMask mask, SInt32 count, KeyButton button);
virtual void keyUp(KeyID key, KeyModifierMask mask, KeyButton button);
@@ -49,14 +44,5 @@ public:
//! Send IV to make
void cryptoIv();
protected:
// CClientProxy overrides
virtual bool parseMessage(const UInt8* code);
private:
// message handlers
void gameDeviceTimingResp();
void gameDeviceFeedback();
CServer* m_server;
};

View File

@@ -72,12 +72,6 @@ endif()
include_directories(${inc})
add_library(server STATIC ${src})
if (WIN32)
if (GAME_DEVICE_SUPPORT)
include_directories($ENV{DXSDK_DIR}/Include)
endif()
endif()
if (UNIX)
target_link_libraries(server synergy)
endif()

View File

@@ -243,30 +243,6 @@ CPrimaryClient::mouseWheel(SInt32, SInt32)
// ignore
}
void
CPrimaryClient::gameDeviceButtons(GameDeviceID, GameDeviceButton)
{
// ignore
}
void
CPrimaryClient::gameDeviceSticks(GameDeviceID, SInt16, SInt16, SInt16, SInt16)
{
// ignore
}
void
CPrimaryClient::gameDeviceTriggers(GameDeviceID, UInt8, UInt8)
{
// ignore
}
void
CPrimaryClient::gameDeviceTimingReq()
{
// ignore
}
void
CPrimaryClient::screensaver(bool)
{

View File

@@ -141,10 +141,6 @@ public:
virtual void mouseMove(SInt32 xAbs, SInt32 yAbs);
virtual void mouseRelativeMove(SInt32 xRel, SInt32 yRel);
virtual void mouseWheel(SInt32 xDelta, SInt32 yDelta);
virtual void gameDeviceButtons(GameDeviceID id, GameDeviceButton buttons);
virtual void gameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2);
virtual void gameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2);
virtual void gameDeviceTimingReq();
virtual void screensaver(bool activate);
virtual void resetOptions();
virtual void setOptions(const COptionsList& options);

View File

@@ -132,22 +132,6 @@ CServer::CServer(CConfig& config, CPrimaryClient* primaryClient, CScreen* screen
m_primaryClient->getEventTarget(),
new TMethodEventJob<CServer>(this,
&CServer::handleWheelEvent));
m_events->adoptHandler(m_events->forIPrimaryScreen().gameDeviceButtons(),
m_primaryClient->getEventTarget(),
new TMethodEventJob<CServer>(this,
&CServer::handleGameDeviceButtons));
m_events->adoptHandler(m_events->forIPrimaryScreen().gameDeviceSticks(),
m_primaryClient->getEventTarget(),
new TMethodEventJob<CServer>(this,
&CServer::handleGameDeviceSticks));
m_events->adoptHandler(m_events->forIPrimaryScreen().gameDeviceTriggers(),
m_primaryClient->getEventTarget(),
new TMethodEventJob<CServer>(this,
&CServer::handleGameDeviceTriggers));
m_events->adoptHandler(m_events->forIPrimaryScreen().gameDeviceTimingReq(),
m_primaryClient->getEventTarget(),
new TMethodEventJob<CServer>(this,
&CServer::handleGameDeviceTimingReq));
m_events->adoptHandler(m_events->forIPrimaryScreen().screensaverActivated(),
m_primaryClient->getEventTarget(),
new TMethodEventJob<CServer>(this,
@@ -358,18 +342,6 @@ CServer::disconnect()
}
}
void
CServer::gameDeviceTimingResp(UInt16 freq)
{
m_screen->gameDeviceTimingResp(freq);
}
void
CServer::gameDeviceFeedback(GameDeviceID id, UInt16 m1, UInt16 m2)
{
m_screen->gameDeviceFeedback(id, m1, m2);
}
UInt32
CServer::getNumClients() const
{
@@ -1337,36 +1309,6 @@ CServer::handleWheelEvent(const CEvent& event, void*)
onMouseWheel(info->m_xDelta, info->m_yDelta);
}
void
CServer::handleGameDeviceButtons(const CEvent& event, void*)
{
IPlatformScreen::CGameDeviceButtonInfo* info =
reinterpret_cast<IPlatformScreen::CGameDeviceButtonInfo*>(event.getData());
onGameDeviceButtons(info->m_id, info->m_buttons);
}
void
CServer::handleGameDeviceSticks(const CEvent& event, void*)
{
IPlatformScreen::CGameDeviceStickInfo* info =
reinterpret_cast<IPlatformScreen::CGameDeviceStickInfo*>(event.getData());
onGameDeviceSticks(info->m_id, info->m_x1, info->m_y1, info->m_x2, info->m_y2);
}
void
CServer::handleGameDeviceTriggers(const CEvent& event, void*)
{
IPlatformScreen::CGameDeviceTriggerInfo* info =
reinterpret_cast<IPlatformScreen::CGameDeviceTriggerInfo*>(event.getData());
onGameDeviceTriggers(info->m_id, info->m_t1, info->m_t2);
}
void
CServer::handleGameDeviceTimingReq(const CEvent& event, void*)
{
onGameDeviceTimingReq();
}
void
CServer::handleScreensaverActivatedEvent(const CEvent&, void*)
{
@@ -1968,34 +1910,6 @@ CServer::onMouseWheel(SInt32 xDelta, SInt32 yDelta)
m_active->mouseWheel(xDelta, yDelta);
}
void
CServer::onGameDeviceButtons(GameDeviceID id, GameDeviceButton buttons)
{
LOG((CLOG_DEBUG1 "onGameDeviceButtons id=%d buttons=%d", id, buttons));
m_active->gameDeviceButtons(id, buttons);
}
void
CServer::onGameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2)
{
LOG((CLOG_DEBUG1 "onGameDeviceSticks id=%d s1=%+d,%+d s2=%+d,%+d", id, x1, y1, x2, y2));
m_active->gameDeviceSticks(id, x1, y1, x2, y2);
}
void
CServer::onGameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2)
{
LOG((CLOG_DEBUG1 "onGameDeviceTriggers id=%d t1=%d t2=%d", id, t1, t2));
m_active->gameDeviceTriggers(id, t1, t2);
}
void
CServer::onGameDeviceTimingReq()
{
LOG((CLOG_DEBUG1 "onGameDeviceTimingReq"));
m_active->gameDeviceTimingReq();
}
void
CServer::onFileChunkSending(const void* data)
{

View File

@@ -138,12 +138,6 @@ public:
*/
void disconnect();
//! Notify of game device timing response
void gameDeviceTimingResp(UInt16 freq);
//! Notify of game device feedback
void gameDeviceFeedback(GameDeviceID id, UInt16 m1, UInt16 m2);
//! Clears the file buffer
void clearReceivedFileData();
@@ -304,10 +298,6 @@ private:
void handleMotionPrimaryEvent(const CEvent&, void*);
void handleMotionSecondaryEvent(const CEvent&, void*);
void handleWheelEvent(const CEvent&, void*);
void handleGameDeviceButtons(const CEvent&, void*);
void handleGameDeviceSticks(const CEvent&, void*);
void handleGameDeviceTriggers(const CEvent&, void*);
void handleGameDeviceTimingReq(const CEvent&, void*);
void handleScreensaverActivatedEvent(const CEvent&, void*);
void handleScreensaverDeactivatedEvent(const CEvent&, void*);
void handleSwitchWaitTimeout(const CEvent&, void*);
@@ -336,10 +326,6 @@ private:
bool onMouseMovePrimary(SInt32 x, SInt32 y);
void onMouseMoveSecondary(SInt32 dx, SInt32 dy);
void onMouseWheel(SInt32 xDelta, SInt32 yDelta);
void onGameDeviceButtons(GameDeviceID id, GameDeviceButton buttons);
void onGameDeviceSticks(GameDeviceID id, SInt16 x1, SInt16 y1, SInt16 x2, SInt16 y2);
void onGameDeviceTriggers(GameDeviceID id, UInt8 t1, UInt8 t2);
void onGameDeviceTimingReq();
void onFileChunkSending(const void* data);
void onFileRecieveComplete();