mirror of
https://github.com/debauchee/barrier.git
synced 2026-05-08 23:14:20 +08:00
Refactored some platform dependent code into a new library,
lib/arch. This should make porting easier. Will probably continue to refactor a little more, moving platform dependent event handling stuff into lib/platform.
This commit is contained in:
53
lib/arch/CArchMiscWindows.cpp
Normal file
53
lib/arch/CArchMiscWindows.cpp
Normal file
@@ -0,0 +1,53 @@
|
||||
/*
|
||||
* synergy -- mouse and keyboard sharing utility
|
||||
* Copyright (C) 2002 Chris Schoeneman
|
||||
*
|
||||
* This package is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License
|
||||
* found in the file COPYING that should have accompanied this file.
|
||||
*
|
||||
* This package is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
|
||||
#include "CArchMiscWindows.h"
|
||||
#include "CArchDaemonWindows.h"
|
||||
#include <windows.h>
|
||||
|
||||
//
|
||||
// CArchMiscWindows
|
||||
//
|
||||
|
||||
bool
|
||||
CArchMiscWindows::isWindows95Family()
|
||||
{
|
||||
OSVERSIONINFO version;
|
||||
version.dwOSVersionInfoSize = sizeof(version);
|
||||
if (GetVersionEx(&version) == 0) {
|
||||
// cannot determine OS; assume windows 95 family
|
||||
return true;
|
||||
}
|
||||
return (version.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);
|
||||
}
|
||||
|
||||
int
|
||||
CArchMiscWindows::runDaemon(RunFunc runFunc, StopFunc stopFunc)
|
||||
{
|
||||
return CArchDaemonWindows::runDaemon(runFunc, stopFunc);
|
||||
}
|
||||
|
||||
void
|
||||
CArchMiscWindows::daemonRunning(bool running)
|
||||
{
|
||||
CArchDaemonWindows::daemonRunning(running);
|
||||
}
|
||||
|
||||
void
|
||||
CArchMiscWindows::daemonFailed(int result)
|
||||
{
|
||||
CArchDaemonWindows::daemonFailed(result);
|
||||
}
|
||||
Reference in New Issue
Block a user