Merge pull request #8609 from Robyt3/Android-No-Process-No-Server

Disable "Run server" button and process functions on Android
This commit is contained in:
heinrich5991 2024-07-17 15:46:56 +00:00 committed by GitHub
commit f9a94fb5e0
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 6 additions and 3 deletions

View file

@ -4125,6 +4125,7 @@ void cmdline_free(int argc, const char **argv)
#endif
}
#if !defined(CONF_PLATFORM_ANDROID)
PROCESS shell_execute(const char *file, EShellExecuteWindowState window_state)
{
#if defined(CONF_FAMILY_WINDOWS)
@ -4207,7 +4208,6 @@ bool is_process_alive(PROCESS process)
#endif
}
#if !defined(CONF_PLATFORM_ANDROID)
int open_link(const char *link)
{
#if defined(CONF_FAMILY_WINDOWS)

View file

@ -2542,7 +2542,7 @@ typedef pid_t PROCESS;
*/
constexpr PROCESS INVALID_PROCESS = 0;
#endif
#if !defined(CONF_PLATFORM_ANDROID)
/**
* Determines the initial window state when using @link shell_execute @endlink
* to execute a process.
@ -2599,7 +2599,6 @@ int kill_process(PROCESS process);
*/
bool is_process_alive(PROCESS process);
#if !defined(CONF_PLATFORM_ANDROID)
/**
* Opens a link in the browser.
*

View file

@ -122,6 +122,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
if(DoButton_Menu(&s_SettingsButton, Localize("Settings"), 0, &Button, g_Config.m_ClShowStartMenuImages ? "settings" : 0, IGraphics::CORNER_ALL, Rounding, 0.5f, ColorRGBA(0.0f, 0.0f, 0.0f, 0.25f)) || CheckHotKey(KEY_S))
NewPage = PAGE_SETTINGS;
#if !defined(CONF_PLATFORM_ANDROID)
Menu.HSplitBottom(5.0f, &Menu, 0); // little space
Menu.HSplitBottom(40.0f, &Menu, &Button);
static CButtonContainer s_LocalServerButton;
@ -151,6 +152,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
}
}
}
#endif
static bool EditorHotkeyWasPressed = true;
static float EditorHotKeyChecktime = 0.0f;
@ -269,6 +271,7 @@ void CMenus::RenderStartMenu(CUIRect MainView)
void CMenus::KillServer()
{
#if !defined(CONF_PLATFORM_ANDROID)
if(m_ServerProcess.m_Process)
{
if(kill_process(m_ServerProcess.m_Process))
@ -277,4 +280,5 @@ void CMenus::KillServer()
m_ForceRefreshLanPage = true;
}
}
#endif
}