added options for the threaded stuff in the menu and set version

This commit is contained in:
oy 2013-02-24 19:43:09 +01:00
parent 718653ff85
commit f010791231
2 changed files with 27 additions and 4 deletions

View file

@ -619,6 +619,7 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
static int s_GfxFsaaSamples = g_Config.m_GfxFsaaSamples; static int s_GfxFsaaSamples = g_Config.m_GfxFsaaSamples;
static int s_GfxTextureQuality = g_Config.m_GfxTextureQuality; static int s_GfxTextureQuality = g_Config.m_GfxTextureQuality;
static int s_GfxTextureCompression = g_Config.m_GfxTextureCompression; static int s_GfxTextureCompression = g_Config.m_GfxTextureCompression;
static int s_GfxThreaded = g_Config.m_GfxThreaded;
CUIRect ModeList; CUIRect ModeList;
MainView.VSplitLeft(300.0f, &MainView, &ModeList); MainView.VSplitLeft(300.0f, &MainView, &ModeList);
@ -700,7 +701,24 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
CheckSettings = true; CheckSettings = true;
} }
MainView.HSplitTop(40.0f, &Button, &MainView); MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_GfxThreaded, Localize("Threaded rendering"), g_Config.m_GfxThreaded, &Button))
{
g_Config.m_GfxThreaded ^= 1;
CheckSettings = true;
}
MainView.HSplitTop(20.0f, &Button, &MainView);
if(g_Config.m_GfxThreaded)
{
Button.VSplitLeft(20.0f, 0, &Button);
if(DoButton_CheckBox(&g_Config.m_GfxAsyncRender, Localize("Handle rendering async from updates"), g_Config.m_GfxAsyncRender, &Button))
{
g_Config.m_GfxAsyncRender ^= 1;
CheckSettings = true;
}
}
MainView.HSplitTop(20.0f, &Button, &MainView); MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_GfxTextureQuality, Localize("Quality Textures"), g_Config.m_GfxTextureQuality, &Button)) if(DoButton_CheckBox(&g_Config.m_GfxTextureQuality, Localize("Quality Textures"), g_Config.m_GfxTextureQuality, &Button))
{ {
@ -730,7 +748,8 @@ void CMenus::RenderSettingsGraphics(CUIRect MainView)
s_GfxVsync == g_Config.m_GfxVsync && s_GfxVsync == g_Config.m_GfxVsync &&
s_GfxFsaaSamples == g_Config.m_GfxFsaaSamples && s_GfxFsaaSamples == g_Config.m_GfxFsaaSamples &&
s_GfxTextureQuality == g_Config.m_GfxTextureQuality && s_GfxTextureQuality == g_Config.m_GfxTextureQuality &&
s_GfxTextureCompression == g_Config.m_GfxTextureCompression) s_GfxTextureCompression == g_Config.m_GfxTextureCompression &&
s_GfxThreaded == g_Config.m_GfxThreaded)
m_NeedRestartGraphics = false; m_NeedRestartGraphics = false;
else else
m_NeedRestartGraphics = true; m_NeedRestartGraphics = true;
@ -807,6 +826,10 @@ void CMenus::RenderSettingsSound(CUIRect MainView)
if(DoButton_CheckBox(&g_Config.m_SndNonactiveMute, Localize("Mute when not active"), g_Config.m_SndNonactiveMute, &Button)) if(DoButton_CheckBox(&g_Config.m_SndNonactiveMute, Localize("Mute when not active"), g_Config.m_SndNonactiveMute, &Button))
g_Config.m_SndNonactiveMute ^= 1; g_Config.m_SndNonactiveMute ^= 1;
MainView.HSplitTop(20.0f, &Button, &MainView);
if(DoButton_CheckBox(&g_Config.m_ClThreadsoundloading, Localize("Threaded sound loading"), g_Config.m_ClThreadsoundloading, &Button))
g_Config.m_ClThreadsoundloading ^= 1;
// sample rate box // sample rate box
{ {
char aBuf[64]; char aBuf[64];

View file

@ -3,7 +3,7 @@
#ifndef GAME_VERSION_H #ifndef GAME_VERSION_H
#define GAME_VERSION_H #define GAME_VERSION_H
#include "generated/nethash.cpp" #include "generated/nethash.cpp"
#define GAME_VERSION "0.6 trunk" #define GAME_VERSION "0.6.2"
#define GAME_NETVERSION "0.6 " GAME_NETVERSION_HASH #define GAME_NETVERSION "0.6 " GAME_NETVERSION_HASH
static const char GAME_RELEASE_VERSION[8] = {'0', '.', '6', '1', 0}; static const char GAME_RELEASE_VERSION[8] = {'0', '.', '6', '2', 0};
#endif #endif