Small tweaks to platform-dependent behaviour

This commit is contained in:
CaiB 2020-05-17 15:14:03 +09:00
parent c6f64773a7
commit b6e9523895
2 changed files with 12 additions and 4 deletions

View file

@ -3,7 +3,6 @@
#if defined(WIN32) || defined(USE_WINDOWS) #if defined(WIN32) || defined(USE_WINDOWS)
#include <winsock2.h> #include <winsock2.h>
#include <windows.h> #include <windows.h>
#define strdup _strdup
#endif #endif
#include <ctype.h> #include <ctype.h>
@ -346,8 +345,12 @@ int main(int argc, char ** argv)
WSAStartup(0x202, &wsaData); WSAStartup(0x202, &wsaData);
#ifdef TCC
REGISTERWinCNFA();
REGISTERcnfa_wasapi(); REGISTERcnfa_wasapi();
strcpy( sound_source, "WASAPI" ); #endif
strcpy( sound_source, "WASAPI" ); // Use either "sound_source=WASAPI" or "sound_source=WIN" in config file.
#elif defined( ANDROID ) #elif defined( ANDROID )
strcpy( sound_source, "ANDROID" ); strcpy( sound_source, "ANDROID" );
@ -449,7 +452,11 @@ int main(int argc, char ** argv)
Now = OGGetAbsoluteTime(); Now = OGGetAbsoluteTime();
double Last = Now; double Last = Now;
while( !headless ) #ifdef ANDROID
while(!bQuitColorChord)
#else
while(!headless)
#endif
{ {
char stt[1024]; char stt[1024];
//Handle Rawdraw frame swappign //Handle Rawdraw frame swappign

View file

@ -19,4 +19,5 @@ rem set CC=C:\tcc\i386-win32-tcc.exe
rem set CC=C:\tcc\x86_64-win32-tcc.exe rem set CC=C:\tcc\x86_64-win32-tcc.exe
@echo on @echo on
%CC% %CFLAGS% %INCLUDES% %ARCH_SPECIFIC% %SOURCES% %LDFLAGS% -o ..\colorchord.exe %CC% %CFLAGS% %INCLUDES% %ARCH_SPECIFIC% %SOURCES% %LDFLAGS% -o ..\colorchord.exe
pause @echo off
pause