Hopefully fixed the windows issue, with debug lines.
This commit is contained in:
parent
b2df298417
commit
77d363fa0a
|
@ -81,6 +81,26 @@ void debug( const char* format, ... ) {
|
|||
#include <windows.h>
|
||||
#include <conio.h>
|
||||
|
||||
bool sleep_and_input(char* c, int sleep)
|
||||
{
|
||||
void *input = GetStdHandle(STD_INPUT_HANDLE);
|
||||
int wait_result = WaitForSingleObject(input, sleep*1000);
|
||||
if (wait_result == WAIT_TIMEOUT) {
|
||||
/* it timed out - no input */
|
||||
debug("wait timed out, no input");
|
||||
return false;
|
||||
} else if (wait_result == WAIT_OBJECT_0){
|
||||
/* it signaled in time - input available */
|
||||
*c = _getch();
|
||||
return true;
|
||||
} else if (wait_result == WAIT_FAILED || wait_result == WAIT_ABANDONED) {
|
||||
/* some shit went wrong */
|
||||
debug("somethting went wrong with wait");
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
};
|
||||
/*
|
||||
bool sleep_and_input(char* c, int sleep)
|
||||
{
|
||||
for (int i = 0; i < sleep * 2; ++i)
|
||||
|
@ -94,7 +114,7 @@ bool sleep_and_input(char* c, int sleep)
|
|||
}
|
||||
return false;
|
||||
};
|
||||
|
||||
*/
|
||||
#else
|
||||
#define EXE ""
|
||||
|
||||
|
|
|
@ -25,7 +25,7 @@ package org.moparscape.res.impl;
|
|||
*/
|
||||
public class BTDownloaderCRCs {
|
||||
|
||||
private static final long[] crcs = new long[]{1388496215L /*-java_client.linux.x86*/, 1335574431L /*-java_client.osx.i386*/, 2025981925L /*-java_client.osx.ppc*/, 3379902210L /*-java_client.win32.exe*/};
|
||||
private static final long[] crcs = new long[]{1388496215L /*-java_client.linux.x86*/, 3350772002L /*-java_client.osx.i386*/, 1847997845L /*-java_client.osx.ppc*/, 3985172341L /*-java_client.win32.exe*/};
|
||||
|
||||
public static final int LINUX = 0;
|
||||
public static final int OSX386 = 1;
|
||||
|
|
Loading…
Reference in New Issue