From 541ecbda7818cbb53c5a068ef2e0c164cd7ea489 Mon Sep 17 00:00:00 2001 From: squall-leonhart Date: Wed, 4 Jan 2012 19:38:33 +0000 Subject: [PATCH] SubWCRev is no longer standalone, removed from dependencies and pointed the project files to find it via path updated DevInfo.txt applied khh's patch for gbalink.cpp though more changes are required to bring trunk up to building since the Wx patches git-svn-id: https://svn.code.sf.net/p/vbam/code/trunk@1064 a31d4220-a93d-0410-bf67-fe4944624d44 --- doc/DevInfo.txt | 3 ++- project/vs2010_mfc/VBA2010.suo | Bin 20992 -> 20992 bytes project/vs2010_mfc/VBA2010.vcxproj | 6 +++--- src/gba/GBALink.cpp | 26 +++++++++++++++----------- 4 files changed, 20 insertions(+), 15 deletions(-) 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 3c8aba3765193c088d34ba189ae2af404202ba3e..d15287be40d01cf61a5ebfd5f7851d072b96ccd6 100644 GIT binary patch delta 389 zcmZoz!q~8caf1&Fqv~Wu7J0USH!oAgPH!$^31gf*(OqZr7giQFjwS{On9Rs&ve|@3 zfRVY3fnl$9pMGHeg}j{DnV&g@Yd`!iyw2 zxkTgw2S}+nilC@JCnGmdgb!Kti>UwP!z_lAOT+>uAJH|~{6&m~kzI!cs03(BppxTe z2Z;zS#-7Rg%FdJdTzNLXQu1M9oC4)?Y;I6>X69sM1}YW=X@EOR1E{J2=z-M9s$Nn+ zY1YY&TDFUHm?nQRlAAn3TV=D8UK0}s$QlhKeUrZ!gs|`+32ZJgJj2VFJ^7)%Co3aR o9A+^OI9&4V6+kv`R(IfMWc1!_?%2c4$tVgGkwrG*iw_Sg00^#UmjD0& delta 390 zcmZoz!q~8caf1&FqwHiw7J0UUeqYNen>H7*gfX&+GB7Yqj`vcWY{0_4`3oxx8%GOJ z1Oz5Ca++*5;SpeDt^jfzwVk;G7>XED8FU%K87d|_+G|eU!|Sw(?=a)!!z_lIzwigJ zaEJr7@q)BM4V+vea)CntD8PdvDC$4incsGjm@_9MH&B8fMN%w)g&8C;(OqZr7cmw_ zb|V%b7bp;@EB7%#tZ*spqieolERq|(IoCXqR1-o%`y{Zc{$c{~#4or+?K*y&} z*3lE2?4a$kNQY@Mm!8t(W!egxo%EWRI8=dVYk{nYsCk4-YE + @@ -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;