/* retrieves the status of the host lock key */
int get_host_lock_key_state(int key)
{
-#if defined( __linux__)
+ /* support only capslock, numlock */
+
+#if defined(CONFIG_LINUX)
unsigned state = 0;
Display *display = XOpenDisplay((char*)0);
if (display) {
}
XCloseDisplay(display);
-
if (key == HOST_CAPSLOCK_KEY) {
return (state & 0x01) != 0;
} else if (key == HOST_NUMLOCK_KEY) {
}
return -1;
-#elif defined(_WIN32)
- int nVirtKey = 0;
+#elif defined(CONFIG_WIN32)
if (key == HOST_CAPSLOCK_KEY) {
- nVirtKey = VK_CAPITAL;
+ return (GetKeyState(VK_CAPITAL) & 1) != 0;
} else if (key == HOST_NUMLOCK_KEY) {
- nVirtKey = VK_NUMLOCK;
+ return (GetKeyState(VK_NUMLOCK) & 1) != 0;
}
- return (GetKeyState(nVirtKey) & 1) != 0;
+ return -1;
+
+#elif defined(CONFIG_DARWIN)
+ //TODO:
#endif
return 0;
void check_shdmem(void)
{
-#ifndef _WIN32
+#ifndef CONFIG_WIN32
int shm_id;
void *shm_addr;
u_int port;
{
#define DIV 1024
-#ifdef __linux__
- char lscmd[MAXLEN] = "lspci >> ";
-#endif
char timeinfo[64] = {0, };
struct tm *tm_time;
struct timeval tval;
INFO("* SDK Version : %s\n", build_version);
INFO("* Package %s\n", pkginfo_version);
INFO("* User name : %s\n", g_get_real_name());
-#ifdef _WIN32
INFO("* Host name : %s\n", g_get_host_name());
-#endif
/* timestamp */
INFO("* Build date : %s\n", build_date);
INFO("* Host sdl version : (%d, %d, %d)\n",
SDL_Linked_Version()->major, SDL_Linked_Version()->minor, SDL_Linked_Version()->patch);
-#if defined( _WIN32)
+#if defined(CONFIG_WIN32)
/* Retrieves information about the current os */
OSVERSIONINFO osvi;
ZeroMemory(&osvi, sizeof(OSVERSIONINFO));
INFO("* Total Ram : %llu kB, Free: %lld kB\n",
memInfo.ullTotalPhys / DIV, memInfo.ullAvailPhys / DIV);
-#elif defined(__linux__)
+#elif defined(CONFIG_LINUX)
/* depends on building */
INFO("* Qemu build machine linux kernel version : (%d, %d, %d)\n",
LINUX_VERSION_CODE >> 16, (LINUX_VERSION_CODE >> 8) & 0xff, LINUX_VERSION_CODE & 0xff);
/* pci device description */
INFO("* Pci devices :\n");
+ char lscmd[MAXLEN] = "lspci >> ";
strcat(lscmd, logpath);
int i = system(lscmd);
INFO("system function command : %s, system function returned value : %d\n", lscmd, i);
+
+#elif defined(CONFIG_DARWIN)
+ //TODO:
#endif
INFO("\n");