fix glib deps in main.cpp

This commit is contained in:
zeromus 2016-03-21 01:33:12 +00:00
parent 60d5004d14
commit 0e346c62be
3 changed files with 14 additions and 51 deletions

View File

@ -159,7 +159,7 @@
<FavorSizeOrSpeed>Neither</FavorSizeOrSpeed>
<EnableFiberSafeOptimizations>false</EnableFiberSafeOptimizations>
<WholeProgramOptimization>false</WholeProgramOptimization>
<AdditionalIncludeDirectories>.;..;lua\include;glib-2.20.1\build;glib-2.20.1\build\glib;.\zlib128;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx;File_Extractor;..\libretro-common\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<AdditionalIncludeDirectories>B:\svn\desmume\trunk\desmume\src\windows\pthread;.;..;lua\include;glib-2.20.1\build;glib-2.20.1\build\glib;.\zlib128;.\zziplib;.\winpcap;userconfig;defaultconfig;.\agg\include;.\agg\examples;directx;File_Extractor;..\libretro-common\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>HAVE_ZLIB_DEFLATE;DEBUG;_CRT_SECURE_NO_DEPRECATE;GLIB_STATIC_COMPILATION;WIN32;BETA_VERSION;NOMINMAX;HAVE_LIBZ;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ExceptionHandling>Sync</ExceptionHandling>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
@ -1098,36 +1098,6 @@
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.libs\directx.tag;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|x64'">.libs\directx.tag;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="glib-2.20.1\glib-2.20.1.7z">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib*
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">7z.exe;un7z_and_touch.bat;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">.libs\glib-vc8.tag;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib*
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">7z.exe;un7z_and_touch.bat;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">.libs\glib-vc8.tag;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Dev+|Win32'">call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib*
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Dev+|Win32'">7z.exe;un7z_and_touch.bat;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Dev+|Win32'">.libs\glib-vc8.tag;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib*
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|Win32'">call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib*
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">7z.exe;un7z_and_touch.bat;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|Win32'">7z.exe;un7z_and_touch.bat;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">.libs\glib-vc8.tag;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|Win32'">.libs\glib-vc8.tag;%(Outputs)</Outputs>
<Command Condition="'$(Configuration)|$(Platform)'=='Release|x64'">call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib*
</Command>
<Command Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|x64'">call un7z_and_touch.bat glib-2.20.1\glib-2.20.1.7z .libs\glib*
</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">7z.exe;un7z_and_touch.bat;%(AdditionalInputs)</AdditionalInputs>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|x64'">7z.exe;un7z_and_touch.bat;%(AdditionalInputs)</AdditionalInputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release|x64'">.libs\glib-vc8.tag;%(Outputs)</Outputs>
<Outputs Condition="'$(Configuration)|$(Platform)'=='Release Fastbuild|x64'">.libs\glib-vc8.tag;%(Outputs)</Outputs>
</CustomBuild>
<CustomBuild Include="lua\lua.7z">
<Command Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">call un7z_and_touch.bat lua\lua.7z .libs\win32\lua* .libs\x64\lua* .libs\lua.tag</Command>
<AdditionalInputs Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">7z.exe;un7z_and_touch.bat</AdditionalInputs>

View File

@ -1838,9 +1838,6 @@
<CustomBuild Include="directx\directx.7z">
<Filter>Windows\libs</Filter>
</CustomBuild>
<CustomBuild Include="glib-2.20.1\glib-2.20.1.7z">
<Filter>Windows\libs</Filter>
</CustomBuild>
<CustomBuild Include="lua\lua.7z">
<Filter>Windows\libs</Filter>
</CustomBuild>

View File

@ -67,10 +67,10 @@
#include "../utils/advanscene.h"
//other random stuff
#include "rthreads/rthreads.h"
#include "recentroms.h"
#include "resource.h"
#include "CWindow.h"
#include "gthread.h"
#include "version.h"
#include "inputdx.h"
#include "console.h"
@ -1881,8 +1881,8 @@ struct DisplayBuffer
volatile int currDisplayBuffer=-1;
volatile int newestDisplayBuffer=-2;
GMutex *display_mutex = NULL;
GThread *display_thread = NULL;
slock_t *display_mutex = NULL;
sthread_t *display_thread = NULL;
volatile bool display_die = false;
HANDLE display_wakeup_event = INVALID_HANDLE_VALUE;
@ -1937,7 +1937,7 @@ static void DoDisplay(bool firstTime)
if(AnyLuaActive())
{
if(g_thread_self() == display_thread)
if(sthread_isself(display_thread))
{
InvokeOnMainThread((void(*)(DWORD))
CallRegisteredLuaFunctions, LUACALL_AFTEREMULATIONGUI);
@ -1976,13 +1976,13 @@ static void DoDisplay(bool firstTime)
void displayProc()
{
g_mutex_lock(display_mutex);
slock_lock(display_mutex);
//find a buffer to display
int todo = newestDisplayBuffer;
bool alreadyDisplayed = (todo == currDisplayBuffer);
g_mutex_unlock(display_mutex);
slock_unlock(display_mutex);
//something new to display:
if(!alreadyDisplayed) {
@ -2014,7 +2014,7 @@ void KillDisplay()
{
display_die = true;
SetEvent(display_wakeup_event);
g_thread_join(display_thread);
sthread_join(display_thread);
}
void Display()
@ -2031,14 +2031,11 @@ void Display()
{
if(display_thread == NULL)
{
display_mutex = g_mutex_new();
display_thread = g_thread_create( (GThreadFunc)displayThread,
NULL,
TRUE,
NULL);
display_mutex = slock_new();
display_thread = sthread_create(&displayThread, nullptr);
}
g_mutex_lock(display_mutex);
slock_lock(display_mutex);
if(int diff = (currDisplayBuffer+1)%3 - newestDisplayBuffer)
newestDisplayBuffer += diff;
@ -2054,7 +2051,7 @@ void Display()
}
memcpy(db.buffer,dispInfo.masterCustomBuffer,targetSize);
g_mutex_unlock(display_mutex);
slock_unlock(display_mutex);
}
}
@ -3479,7 +3476,6 @@ int WINAPI WinMain (HINSTANCE hThisInstance,
timeBeginPeriod (wmTimerRes);
}
g_thread_init (NULL);
hAppInst=hThisInstance;
GetINIPath();
@ -6319,13 +6315,13 @@ LRESULT CALLBACK GFX3DSettingsDlgProc(HWND hw, UINT msg, WPARAM wp, LPARAM lp)
{
Lock lock(win_backbuffer_sync);
if(display_mutex) g_mutex_lock(display_mutex);
if(display_mutex) slock_lock(display_mutex);
Change3DCoreWithFallbackAndSave(ComboBox_GetCurSel(GetDlgItem(hw, IDC_3DCORE)));
video.SetPrescale(CommonSettings.GFX3D_PrescaleHD,1);
GPU->SetCustomFramebufferSize(256*video.prescaleHD,192*video.prescaleHD);
ScaleScreen(windowSize, false);
UpdateScreenRects();
if(display_mutex) g_mutex_unlock(display_mutex);
if(display_mutex) slock_unlock(display_mutex);
}
WritePrivateProfileBool("3D", "HighResolutionInterpolateColor", CommonSettings.GFX3D_HighResolutionInterpolateColor, IniName);