Skip to content

Commit

Permalink
Added FAQ and change log to docs
Browse files Browse the repository at this point in the history
Disabled WASAPI for msvc builds
  • Loading branch information
ec- committed Jan 16, 2021
1 parent 6e308a2 commit 7a04c83
Show file tree
Hide file tree
Showing 6 changed files with 1,105 additions and 21 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -107,15 +107,15 @@ jobs:
copy code\win32\msvc2017\output\quake3e.ded.exe bin\quake3e.ded${{ matrix.suffix }}.exe
msbuild code\win32\msvc2017\renderer.vcxproj -m -p:Configuration=${{ matrix.config }},Platform=${{ matrix.platform }}
msbuild code\win32\msvc2017\quake3e.vcxproj -m -p:TargetName=quake3e,Configuration=${{ matrix.config }},Platform=${{ matrix.platform }}
msbuild code\win32\msvc2017\quake3e.vcxproj -m -p:TargetName=quake3e,Configuration=${{ matrix.config }},Platform=${{ matrix.platform }},UseWasapi=USE_WASAPI=0
copy code\win32\msvc2017\output\quake3e.exe bin\quake3e${{ matrix.suffix }}.exe
msbuild code\win32\msvc2017\renderer.vcxproj -t:Clean -m -p:Configuration=${{ matrix.config }},Platform=${{ matrix.platform }}
msbuild code\win32\msvc2017\quake3e.vcxproj -t:Clean -m -p:TargetName=quake3e,Configuration=${{ matrix.config }},Platform=${{ matrix.platform }}
msbuild code\win32\msvc2017\renderervk.vcxproj -m -p:Configuration=${{ matrix.config }},Platform=${{ matrix.platform }}
msbuild code\win32\msvc2017\quake3e.vcxproj -m -p:TargetName=quake3e,Configuration=${{ matrix.config }},Platform=${{ matrix.platform }}
msbuild code\win32\msvc2017\quake3e.vcxproj -m -p:TargetName=quake3e,Configuration=${{ matrix.config }},Platform=${{ matrix.platform }},UseWasapi=USE_WASAPI=0
copy code\win32\msvc2017\output\quake3e.exe bin\quake3e-vulkan${{ matrix.suffix }}.exe
Expand Down
2 changes: 0 additions & 2 deletions .mailmap

This file was deleted.

12 changes: 6 additions & 6 deletions code/win32/msvc2017/quake3e.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\libcurl\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;$(UseWASAPI);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
Expand Down Expand Up @@ -147,7 +147,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\libcurl\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;$(UseWASAPI);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
Expand All @@ -174,7 +174,7 @@
<ClCompile>
<Optimization>Disabled</Optimization>
<AdditionalIncludeDirectories>..\..\libcurl\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_VULKAN_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_DEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_VULKAN_API;$(UseWASAPI);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<BasicRuntimeChecks>EnableFastChecks</BasicRuntimeChecks>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
Expand All @@ -200,7 +200,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\libcurl\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SKIPIDLOGO;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SKIPIDLOGO;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;$(UseWASAPI);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
Expand Down Expand Up @@ -228,7 +228,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\libcurl\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SKIPIDLOGO;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SKIPIDLOGO;USE_CURL;CURL_STATICLIB;USE_VULKAN_API;$(UseWASAPI);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
Expand Down Expand Up @@ -256,7 +256,7 @@
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|ARM64'">
<ClCompile>
<AdditionalIncludeDirectories>..\..\libcurl\windows\include;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SKIPIDLOGO;USE_VULKAN_API;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<PreprocessorDefinitions>WIN32;_WIN32;NDEBUG;_WINDOWS;_CRT_SECURE_NO_DEPRECATE;_WINSOCK_DEPRECATED_NO_WARNINGS;USE_SKIPIDLOGO;USE_VULKAN_API;$(UseWASAPI);%(PreprocessorDefinitions)</PreprocessorDefinitions>
<AssemblerListingLocation>$(IntDir)</AssemblerListingLocation>
<ObjectFileName>$(IntDir)</ObjectFileName>
<ProgramDataBaseFileName>$(IntDir)</ProgramDataBaseFileName>
Expand Down
24 changes: 13 additions & 11 deletions code/win32/win_snd.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,12 @@ static qboolean dsound_init;

// Visual Studio 2012+ or MINGW
#if ( _MSC_VER >= 1700 ) || defined(MINGW)
#define USE_WASAPI
#ifndef USE_WASAPI
#define USE_WASAPI 1
#endif
#endif

#ifdef USE_WASAPI
#if USE_WASAPI
static qboolean wasapi_init;

#include <mmreg.h>
Expand Down Expand Up @@ -691,7 +693,7 @@ SNDDMA_Shutdown
*/
void SNDDMA_Shutdown( void ) {
Com_DPrintf( "Shutting down sound system\n" );
#ifdef USE_WASAPI
#if USE_WASAPI
if ( wasapi_init ) {
Done_WASAPI();
}
Expand Down Expand Up @@ -732,7 +734,7 @@ void SNDDMA_Shutdown( void ) {
pDSPBuf = NULL;

dsound_init = qfalse;
#ifdef USE_WASAPI
#if USE_WASAPI
wasapi_init = qfalse;
#endif
memset( &dma, 0, sizeof( dma ) );
Expand All @@ -751,7 +753,7 @@ Returns false if failed
*/
qboolean SNDDMA_Init( void ) {

#ifdef USE_WASAPI
#if USE_WASAPI
const char *defdrv;
cvar_t *s_driver;

Expand All @@ -770,13 +772,13 @@ qboolean SNDDMA_Init( void ) {
memset( &dma, 0, sizeof( dma ) );

dsound_init = qfalse;
#ifdef USE_WASAPI
#if USE_WASAPI
wasapi_init = qfalse;
#endif
if ( CoInitialize( NULL ) != S_OK ) {
return qfalse;
}
#ifdef USE_WASAPI
#if USE_WASAPI
if ( Q_stricmp( s_driver->string, "wasapi" ) == 0 && SNDDMA_InitWASAPI() ) {
dma.driver = "WASAPI";
wasapi_init = qtrue;
Expand Down Expand Up @@ -947,7 +949,7 @@ how many sample are required to fill it up.
===============
*/
int SNDDMA_GetDMAPos( void ) {
#ifdef USE_WASAPI
#if USE_WASAPI
if ( wasapi_init ) {
// restart sound system if needed
if ( doSndRestart ) {
Expand Down Expand Up @@ -985,7 +987,7 @@ void SNDDMA_BeginPainting( void ) {
DWORD *pbuf, *pbuf2;
HRESULT hresult;
DWORD dwStatus;
#ifdef USE_WASAPI
#if USE_WASAPI
if ( wasapi_init ) {
EnterCriticalSection( &cs );
return;
Expand Down Expand Up @@ -1040,7 +1042,7 @@ Also unlocks the dsound buffer
===============
*/
void SNDDMA_Submit( void ) {
#ifdef USE_WASAPI
#if USE_WASAPI
if ( wasapi_init ) {
LeaveCriticalSection( &cs );
return;
Expand All @@ -1061,7 +1063,7 @@ When we change windows we need to do this
=================
*/
void SNDDMA_Activate( void ) {
#ifdef USE_WASAPI
#if USE_WASAPI
if ( wasapi_init ) {
if ( inPlay == 0 ) {
doSndRestart = qtrue;
Expand Down
15 changes: 15 additions & 0 deletions docs/quake3e-FAQ.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
Q: \r_mode doesn't work for fullscreen
A: dedicated cvar \r_modeFullscreen now is used for fullscreen,
set its value to "" if you want to use \r_mode again

Q: what mouse mode is used for raw input?
A: \in_mouse 1

Q: cnq3' raw input feels different
A: try \in_lagged 1

Q: how to minimize/restore game window by ALT+X key, for example?
A: set \in_minimize "alt+x" ; in_restart

Q: non-US/EN keyboard input is not working as before
A: \in_forceCharset 0
Loading

0 comments on commit 7a04c83

Please sign in to comment.