add mobile definitions

This commit is contained in:
Er2 2023-08-20 14:17:00 +03:00
parent b5a9add343
commit 9cc3539f6d
5 changed files with 17 additions and 5 deletions

View File

@ -23,7 +23,7 @@ extern ConVar default_fov;
extern IMatSystemSurface *g_pMatSystemSurface;
#ifdef ANDROID
#ifdef PLATFORM_MOBILE
#define TOUCH_DEFAULT "1"
#else
#define TOUCH_DEFAULT "0"

View File

@ -87,9 +87,9 @@ COptionsDialog::COptionsDialog(vgui::Panel *parent) : PropertyDialog(parent, "Op
AddPage(new COptionsSubKeyboard(this), "#GameUI_Keyboard");
AddPage(new COptionsSubMouse(this), "#GameUI_Mouse");
#ifdef ANDROID
AddPage(new COptionsSubTouch(this), "Touch");
#endif
// Requires additional res file from extras_dir.vpk
if (IsMobile())
AddPage(new COptionsSubTouch(this), "Touch");
m_pOptionsSubAudio = new COptionsSubAudio(this);
AddPage(m_pOptionsSubAudio, "#GameUI_Audio");

View File

@ -276,6 +276,13 @@ typedef signed char int8;
#else
#define IsAndroid() false
#endif
#ifdef PLATFORM_MOBILE
#define IsMobile() true
#else
#define IsMobile() false
#endif
// From steam/steamtypes.h
// RTime32
// We use this 32 bit time representing real world time.

View File

@ -582,7 +582,7 @@ void CBaseGamesPage::LoadFilterSettings()
m_bFilterNoEmptyServers = filter->GetInt("NoEmpty");
m_bFilterNoPasswordedServers = filter->GetInt("NoPassword");
m_bFilterReplayServers = filter->GetInt("Replay");
m_pQuickListCheckButton->SetSelected( filter->GetInt( "QuickList", IsAndroid() ) );
m_pQuickListCheckButton->SetSelected( filter->GetInt( "QuickList", IsMobile() ) );
int secureFilter = filter->GetInt("Secure");
m_pSecureFilter->ActivateItem(secureFilter);

View File

@ -190,6 +190,11 @@ def define_platform(conf):
if conf.options.ALLOW64:
conf.define('PLATFORM_64BITS', 1)
if (conf.env.DEST_OS == 'android' or
(conf.env.DEST_OS == 'win32' and conf.env.DEST_CPU in ['arm', 'arm64'])):
conf.env.MOBILE = True
conf.env.append_unique('DEFINES', ['PLATFORM_MOBILE=1'])
if conf.env.DEST_OS == 'linux':
conf.define('_GLIBCXX_USE_CXX11_ABI',0)
conf.env.append_unique('DEFINES', [