diff --git a/doc/DevInfo.txt b/doc/DevInfo.txt index 56148099..e574727d 100644 --- a/doc/DevInfo.txt +++ b/doc/DevInfo.txt @@ -44,9 +44,10 @@ Refer to the instructions below for further assistance: ===Win32/MFC=== This is the full-featured Windows build using the MFC GUI. -The project files are located in trunk/project/vc2008_mfc (VBA2008.sln). +The project files are located in /project/vc2008_mfc (VBA2008.sln) and /project/vs2010_mfc (VBA2010.sln). You also have to install Microsoft's DirectX SDK for Direct3D, DirectInput & XAudio2. If you want to enable OpenAL sound output, install the OpenAL SDK. If you do not want it, #define NO_OAL. Some pixel filters come with assembler code, which is compatible to the NASM syntax. Install NASM somewhere and add it to your compiler's executable file paths. All .asm files will be handled with the "nasm.rules" build rules file which comes with this project file. +SubWCRev.exe is used to append the svn versioning to the output executable, this should already be present if you pulled from the svn, but will require installing if you downloaded the project as a tarball. \ No newline at end of file diff --git a/project/vs2010_mfc/VBA2010.suo b/project/vs2010_mfc/VBA2010.suo index 3c8aba37..d15287be 100644 Binary files a/project/vs2010_mfc/VBA2010.suo and b/project/vs2010_mfc/VBA2010.suo differ diff --git a/project/vs2010_mfc/VBA2010.vcxproj b/project/vs2010_mfc/VBA2010.vcxproj index fd3b02d4..aeeba714 100644 --- a/project/vs2010_mfc/VBA2010.vcxproj +++ b/project/vs2010_mfc/VBA2010.vcxproj @@ -1,4 +1,4 @@ - + @@ -78,7 +78,7 @@ $(IntDir)$(ProjectName)_BuildLog.htm - ..\..\..\dependencies\SubWCRev.exe ..\.. svnrev_template.h ..\..\src\svnrev.h + SubWCRev.exe ..\.. svnrev_template.h ..\..\src\svnrev.h _DEBUG;%(PreprocessorDefinitions) @@ -131,7 +131,7 @@ $(IntDir)$(ProjectName)_BuildLog.htm - ..\..\..\dependencies\SubWCRev.exe ..\.. svnrev_template.h ..\..\src\svnrev.h + SubWCRev.exe ..\.. svnrev_template.h ..\..\src\svnrev.h _DEBUG;%(PreprocessorDefinitions) diff --git a/src/gba/GBALink.cpp b/src/gba/GBALink.cpp index 122a7b9d..613b3454 100644 --- a/src/gba/GBALink.cpp +++ b/src/gba/GBALink.cpp @@ -24,7 +24,7 @@ bool gba_link_enabled = false; #define _(x) x #endif #define N_(x) x -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) #include #else #include @@ -145,19 +145,19 @@ u8 tspeed = 3; u8 transfer = 0; LINKDATA *linkmem = NULL; int linkid = 0, vbaid = 0; -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) HANDLE linksync[4]; #else sem_t *linksync[4]; #endif int savedlinktime = 0; -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) HANDLE mmf = NULL; #else int mmf = -1; #endif char linkevent[] = -#ifndef __WIN32__ +#if !(defined __WIN32__ || defined _WIN32) "/" #endif "VBA link event "; @@ -964,7 +964,7 @@ bool InitLink() { linkid = 0; -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) if((mmf=CreateFileMapping(INVALID_HANDLE_VALUE, NULL, PAGE_READWRITE, 0, sizeof(LINKDATA), LOCAL_LINK_NAME))==NULL){ systemMessage(0, N_("Error creating file mapping")); return false; @@ -1019,7 +1019,7 @@ bool InitLink() break; } if(vbaid == 4){ -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) UnmapViewOfFile(linkmem); CloseHandle(mmf); #else @@ -1039,7 +1039,7 @@ bool InitLink() for(i=0;i<4;i++){ linkevent[sizeof(linkevent)-2]=(char)i+'1'; -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) linksync[i] = firstone ? CreateSemaphore(NULL, 0, 4, linkevent) : OpenSemaphore(SEMAPHORE_ALL_ACCESS, false, linkevent); @@ -1126,7 +1126,7 @@ void CloseLink(void){ for(i=0;i<4;i++){ if(linksync[i]!=NULL){ -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) ReleaseSemaphore(linksync[i], 1, NULL); CloseHandle(linksync[i]); #else @@ -1138,7 +1138,7 @@ void CloseLink(void){ #endif } } -#ifdef __WIN32__ +#if (defined __WIN32__ || defined _WIN32) CloseHandle(mmf); UnmapViewOfFile(linkmem); @@ -1159,7 +1159,7 @@ void CloseLink(void){ // this may be necessary under MSW as well, but I wouldn't know how void CleanLocalLink() { -#ifndef __WIN32__ +#if !(defined __WIN32__ || defined _WIN32) shm_unlink("/" LOCAL_LINK_NAME); for(int i = 0; i < 4; i++) { linkevent[sizeof(linkevent) - 2] = '1' + i; @@ -1383,7 +1383,11 @@ void LinkClientThread(void *_cid){ // even connected yet // corrected sleep on socket worked, but this is more sane // and probably less portable... works with mingw32 at least - usleep(100000); +#if (defined __WIN32__ || defined _WIN32) + Sleep(100); // in milliseconds +#else + usleep(100000); // in microseconds +#endif } numbytes = 0;