Minor fixes and changes
This commit is contained in:
parent
aee23e4940
commit
98f2fc92df
@ -8,7 +8,7 @@ MultiCraft Open Source is a free open-source voxel game engine with easy modding
|
|||||||
|
|
||||||
MultiCraft is based on the Minetest project, which is developed by a [number of contributors](https://github.com/minetest/minetest/graphs/contributors).
|
MultiCraft is based on the Minetest project, which is developed by a [number of contributors](https://github.com/minetest/minetest/graphs/contributors).
|
||||||
|
|
||||||
Copyright © 2014-2021 Maksim Gamarnik [MoNTE48] <MoNTE48@mail.ua> & MultiCraft Development Team.
|
Copyright © 2014-2022 Maksim Gamarnik [MoNTE48] <Maksym48@pm.me> & MultiCraft Development Team.
|
||||||
|
|
||||||
Table of Contents
|
Table of Contents
|
||||||
------------------
|
------------------
|
||||||
|
@ -327,7 +327,7 @@ core.register_on_receiving_chat_message(function(message)
|
|||||||
for _, func in ipairs(callbacks) do
|
for _, func in ipairs(callbacks) do
|
||||||
local ok, err = pcall(func, msg)
|
local ok, err = pcall(func, msg)
|
||||||
if not ok then
|
if not ok then
|
||||||
core.log('error', '[SSCSM] ' .. tostring(err))
|
sscsm.com_send("sscsm:error", tostring(err))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return true
|
return true
|
||||||
|
@ -48,6 +48,7 @@ local function formspec(tabview, name, tabdata)
|
|||||||
local range = tonumber(core.settings:get("viewing_range"))
|
local range = tonumber(core.settings:get("viewing_range"))
|
||||||
local sensitivity = tonumber(core.settings:get("mouse_sensitivity")) * 2000
|
local sensitivity = tonumber(core.settings:get("mouse_sensitivity")) * 2000
|
||||||
local touchtarget = core.settings:get_bool("touchtarget") or false
|
local touchtarget = core.settings:get_bool("touchtarget") or false
|
||||||
|
local fancy_leaves = core.settings:get("leaves_style") == "fancy"
|
||||||
local sound = tonumber(core.settings:get("sound_volume")) ~= 0 and true or false
|
local sound = tonumber(core.settings:get("sound_volume")) ~= 0 and true or false
|
||||||
|
|
||||||
local tab_string =
|
local tab_string =
|
||||||
@ -67,7 +68,7 @@ local function formspec(tabview, name, tabdata)
|
|||||||
"checkbox[0.25,2.3;cb_inventory_items_animations;" .. fgettext("Inv. animations") .. ";"
|
"checkbox[0.25,2.3;cb_inventory_items_animations;" .. fgettext("Inv. animations") .. ";"
|
||||||
.. dump(core.settings:get_bool("inventory_items_animations")) .. "]" ..
|
.. dump(core.settings:get_bool("inventory_items_animations")) .. "]" ..
|
||||||
"checkbox[0.25,2.9;cb_fancy_leaves;" .. fgettext("Fancy Leaves") .. ";"
|
"checkbox[0.25,2.9;cb_fancy_leaves;" .. fgettext("Fancy Leaves") .. ";"
|
||||||
.. dump(sound) .. "]" ..
|
.. dump(fancy_leaves) .. "]" ..
|
||||||
"checkbox[0.25,3.5;cb_touchtarget;" .. fgettext("Touchtarget") .. ";"
|
"checkbox[0.25,3.5;cb_touchtarget;" .. fgettext("Touchtarget") .. ";"
|
||||||
.. dump(touchtarget) .. "]" ..
|
.. dump(touchtarget) .. "]" ..
|
||||||
"checkbox[0.25,4.1;cb_sound;" .. fgettext("Sound") .. ";"
|
"checkbox[0.25,4.1;cb_sound;" .. fgettext("Sound") .. ";"
|
||||||
@ -141,9 +142,6 @@ end
|
|||||||
|
|
||||||
--------------------------------------------------------------------------------
|
--------------------------------------------------------------------------------
|
||||||
local function handle_settings_buttons(this, fields, tabname, tabdata)
|
local function handle_settings_buttons(this, fields, tabname, tabdata)
|
||||||
-- Note dropdowns have to be handled LAST!
|
|
||||||
local ddhandled = false
|
|
||||||
|
|
||||||
--[[if fields["btn_advanced_settings"] ~= nil then
|
--[[if fields["btn_advanced_settings"] ~= nil then
|
||||||
local adv_settings_dlg = create_adv_settings_dlg()
|
local adv_settings_dlg = create_adv_settings_dlg()
|
||||||
adv_settings_dlg:set_parent(this)
|
adv_settings_dlg:set_parent(this)
|
||||||
@ -180,8 +178,8 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
|
|||||||
return true
|
return true
|
||||||
end
|
end
|
||||||
if fields["cb_fancy_leaves"] then
|
if fields["cb_fancy_leaves"] then
|
||||||
core.settings:set("dd_leaves_style", fields["cb_fancy_leaves"] and "fancy" or "opaque")
|
core.settings:set("leaves_style", fields["cb_fancy_leaves"] and "fancy" or "opaque")
|
||||||
ddhandled = true
|
return true
|
||||||
end
|
end
|
||||||
if fields["cb_touchtarget"] then
|
if fields["cb_touchtarget"] then
|
||||||
core.settings:set("touchtarget", fields["cb_touchtarget"])
|
core.settings:set("touchtarget", fields["cb_touchtarget"])
|
||||||
@ -215,6 +213,9 @@ local function handle_settings_buttons(this, fields, tabname, tabdata)
|
|||||||
return true
|
return true
|
||||||
end]]
|
end]]
|
||||||
|
|
||||||
|
-- Note dropdowns have to be handled LAST!
|
||||||
|
local ddhandled = false
|
||||||
|
|
||||||
if fields["cb_touchscreen_target"] then
|
if fields["cb_touchscreen_target"] then
|
||||||
core.settings:set("touchtarget", fields["cb_touchscreen_target"])
|
core.settings:set("touchtarget", fields["cb_touchscreen_target"])
|
||||||
ddhandled = true
|
ddhandled = true
|
||||||
|
Binary file not shown.
Before Width: | Height: | Size: 66 KiB After Width: | Height: | Size: 66 KiB |
Binary file not shown.
Before Width: | Height: | Size: 17 KiB After Width: | Height: | Size: 26 KiB |
@ -5303,7 +5303,7 @@ msgstr "Максимальное количество пакетов за ите
|
|||||||
|
|
||||||
#: src/settings_translation_file.cpp
|
#: src/settings_translation_file.cpp
|
||||||
msgid "Maximum FPS"
|
msgid "Maximum FPS"
|
||||||
msgstr "Максимум кадровой частоты (FPS)"
|
msgstr "Максимальный FPS"
|
||||||
|
|
||||||
#: src/settings_translation_file.cpp
|
#: src/settings_translation_file.cpp
|
||||||
msgid "Maximum FPS when the window is not focused, or when the game is paused."
|
msgid "Maximum FPS when the window is not focused, or when the game is paused."
|
||||||
|
@ -38,14 +38,6 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#if USE_SOUND
|
#if USE_SOUND
|
||||||
#include "sound_openal.h"
|
#include "sound_openal.h"
|
||||||
#endif
|
#endif
|
||||||
#ifdef __IOS__
|
|
||||||
namespace irr {
|
|
||||||
class CIrrDeviceiOS : public IrrlichtDevice {
|
|
||||||
public:
|
|
||||||
void *getViewController();
|
|
||||||
};
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* mainmenumanager.h
|
/* mainmenumanager.h
|
||||||
*/
|
*/
|
||||||
|
@ -692,7 +692,7 @@ public:
|
|||||||
void pauseGame();
|
void pauseGame();
|
||||||
#endif
|
#endif
|
||||||
#ifdef __IOS__
|
#ifdef __IOS__
|
||||||
void customStatustext(const std::wstring &text, float time);
|
void customStatustext(const std::wstring &text);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
@ -1108,17 +1108,6 @@ void Game::run()
|
|||||||
while (RenderingEngine::run()
|
while (RenderingEngine::run()
|
||||||
&& !(*kill || g_gamecallback->shutdown_requested
|
&& !(*kill || g_gamecallback->shutdown_requested
|
||||||
|| (server && server->isShutdownRequested()))) {
|
|| (server && server->isShutdownRequested()))) {
|
||||||
#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__)
|
|
||||||
if (!device->isWindowFocused()) {
|
|
||||||
sleep_ms(50);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#elif defined(__ANDROID__) || defined(__IOS__)
|
|
||||||
if (device->isWindowMinimized()) {
|
|
||||||
sleep_ms(50);
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
const irr::core::dimension2d<u32> ¤t_screen_size =
|
const irr::core::dimension2d<u32> ¤t_screen_size =
|
||||||
RenderingEngine::get_video_driver()->getScreenSize();
|
RenderingEngine::get_video_driver()->getScreenSize();
|
||||||
@ -1138,6 +1127,20 @@ void Game::run()
|
|||||||
// + Sleep time until the wanted FPS are reached
|
// + Sleep time until the wanted FPS are reached
|
||||||
limitFps(&draw_times, &dtime);
|
limitFps(&draw_times, &dtime);
|
||||||
|
|
||||||
|
#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__)
|
||||||
|
if (!device->isWindowFocused()) {
|
||||||
|
if (m_does_lost_focus_pause_game && !isMenuActive())
|
||||||
|
showPauseMenu();
|
||||||
|
sleep_ms(50);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#elif defined(__ANDROID__) || defined(__IOS__)
|
||||||
|
if (device->isWindowMinimized()) {
|
||||||
|
sleep_ms(50);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
// Prepare render data for next iteration
|
// Prepare render data for next iteration
|
||||||
|
|
||||||
updateStats(&stats, draw_times, dtime);
|
updateStats(&stats, draw_times, dtime);
|
||||||
@ -1197,7 +1200,7 @@ void Game::shutdown()
|
|||||||
g_touchscreengui->hide();
|
g_touchscreengui->hide();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
showOverlayMessage(N_("Shutting down..."), 0, 0, false);
|
showOverlayMessage(N_("Shutting down..."), 0, 0);
|
||||||
|
|
||||||
if (clouds)
|
if (clouds)
|
||||||
clouds->drop();
|
clouds->drop();
|
||||||
@ -2558,19 +2561,6 @@ void Game::updatePlayerControl(const CameraOrientation &cam)
|
|||||||
|
|
||||||
inline void Game::step(f32 *dtime)
|
inline void Game::step(f32 *dtime)
|
||||||
{
|
{
|
||||||
#if defined(__ANDROID__) || defined(__IOS__)
|
|
||||||
if (g_menumgr.pausesGame()) {
|
|
||||||
runData.pause_game_timer += *dtime;
|
|
||||||
float disconnect_time = 180.0f;
|
|
||||||
#ifdef __IOS__
|
|
||||||
disconnect_time = simple_singleplayer_mode ? 60.0f : 120.0f;
|
|
||||||
#endif
|
|
||||||
if (runData.pause_game_timer > disconnect_time) {
|
|
||||||
g_gamecallback->disconnect();
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
bool can_be_and_is_paused =
|
bool can_be_and_is_paused =
|
||||||
(simple_singleplayer_mode && g_menumgr.pausesGame());
|
(simple_singleplayer_mode && g_menumgr.pausesGame());
|
||||||
|
|
||||||
@ -4145,6 +4135,7 @@ inline void Game::limitFps(FpsControl *fps_timings, f32 *dtime)
|
|||||||
#endif
|
#endif
|
||||||
#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__)
|
#if defined(__MACH__) && defined(__APPLE__) && !defined(__IOS__)
|
||||||
// FPS limiting causes freezes on macOS
|
// FPS limiting causes freezes on macOS
|
||||||
|
if (!g_menumgr.pausesGame())
|
||||||
frametime_min = 0;
|
frametime_min = 0;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4170,6 +4161,20 @@ inline void Game::limitFps(FpsControl *fps_timings, f32 *dtime)
|
|||||||
*dtime = 0;
|
*dtime = 0;
|
||||||
|
|
||||||
fps_timings->last_time = time;
|
fps_timings->last_time = time;
|
||||||
|
|
||||||
|
#if defined(__ANDROID__) || defined(__IOS__)
|
||||||
|
if (g_menumgr.pausesGame()) {
|
||||||
|
runData.pause_game_timer += *dtime;
|
||||||
|
float disconnect_time = 180.0f;
|
||||||
|
#ifdef __IOS__
|
||||||
|
disconnect_time = simple_singleplayer_mode ? 60.0f : 120.0f;
|
||||||
|
#endif
|
||||||
|
if (runData.pause_game_timer > disconnect_time) {
|
||||||
|
g_gamecallback->disconnect();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
void Game::showOverlayMessage(const char *msg, float dtime, int percent, bool draw_clouds)
|
void Game::showOverlayMessage(const char *msg, float dtime, int percent, bool draw_clouds)
|
||||||
@ -4226,13 +4231,9 @@ void Game::pauseGame()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __IOS__
|
#ifdef __IOS__
|
||||||
void Game::customStatustext(const std::wstring &text, float time)
|
void Game::customStatustext(const std::wstring &text)
|
||||||
{
|
{
|
||||||
m_statustext = text;
|
m_game_ui->showStatusText(text);
|
||||||
if (m_statustext == L"")
|
|
||||||
runData.statustext_time = 0;
|
|
||||||
else
|
|
||||||
runData.statustext_time = time;
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
@ -4339,14 +4340,14 @@ void Game::showPauseMenu()
|
|||||||
str_formspec_escape(control_text);
|
str_formspec_escape(control_text);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef __IOS__
|
|
||||||
float ypos = simple_singleplayer_mode ? 0.7f : 0.1f;
|
float ypos = simple_singleplayer_mode ? 0.7f : 0.1f;
|
||||||
#else
|
#if __IOS__
|
||||||
float ypos = 1.5f;
|
ypos += 0.5f;
|
||||||
#endif
|
#endif
|
||||||
std::ostringstream os;
|
std::ostringstream os;
|
||||||
|
|
||||||
os << "formspec_version[1]" << SIZE_TAG
|
os << "formspec_version[1]" << SIZE_TAG
|
||||||
|
<< "no_prepend[]"
|
||||||
<< "bgcolor[#00000060;true]"
|
<< "bgcolor[#00000060;true]"
|
||||||
<< "button_exit[3.5," << (ypos++) << ";4,0.5;btn_continue;"
|
<< "button_exit[3.5," << (ypos++) << ";4,0.5;btn_continue;"
|
||||||
<< strgettext("Continue") << "]";
|
<< strgettext("Continue") << "]";
|
||||||
@ -4368,8 +4369,10 @@ void Game::showPauseMenu()
|
|||||||
#endif
|
#endif
|
||||||
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_menu;"
|
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_menu;"
|
||||||
<< strgettext("Exit to Menu") << "]";
|
<< strgettext("Exit to Menu") << "]";
|
||||||
|
#ifndef __IOS__
|
||||||
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_os;"
|
os << "button_exit[3.5," << (ypos++) << ";4,0.5;btn_exit_os;"
|
||||||
<< strgettext("Exit to OS") << "]"
|
<< strgettext("Exit to OS") << "]"
|
||||||
|
#endif
|
||||||
/* << "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]"
|
/* << "textarea[7.5,0.25;3.9,6.25;;" << control_text << ";]"
|
||||||
<< "textarea[0.4,0.25;3.9,6.25;;" << PROJECT_NAME_C " " VERSION_STRING "\n"
|
<< "textarea[0.4,0.25;3.9,6.25;;" << PROJECT_NAME_C " " VERSION_STRING "\n"
|
||||||
<< "\n"
|
<< "\n"
|
||||||
@ -4523,11 +4526,11 @@ extern "C" void external_pause_game()
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef __IOS__
|
#ifdef __IOS__
|
||||||
extern "C" void external_statustext(const char *text, float duration)
|
extern "C" void external_statustext(const char *text)
|
||||||
{
|
{
|
||||||
if (!g_game)
|
if (!g_game)
|
||||||
return;
|
return;
|
||||||
std::wstring s = utf8_to_wide(std::string(text));
|
std::wstring s = utf8_to_wide(std::string(text));
|
||||||
g_game->customStatustext(s, duration);
|
g_game->customStatustext(s);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -23,15 +23,8 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "gui/mainmenumanager.h"
|
#include "gui/mainmenumanager.h"
|
||||||
#include "hud.h"
|
#include "hud.h"
|
||||||
|
|
||||||
#if defined(__ANDROID__)
|
|
||||||
#include "porting_android.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef __IOS__
|
#ifdef __IOS__
|
||||||
#include "porting_ios.h"
|
#include "porting_ios.h"
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined(__IOS__)
|
|
||||||
extern "C" void external_pause_game();
|
extern "C" void external_pause_game();
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -60,6 +60,15 @@ with this program; if not, write to the Free Software Foundation, Inc.,
|
|||||||
#include "defaultsettings.h"
|
#include "defaultsettings.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef __IOS__
|
||||||
|
namespace irr {
|
||||||
|
class CIrrDeviceiOS : public IrrlichtDevice {
|
||||||
|
public:
|
||||||
|
void *getViewController();
|
||||||
|
};
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
RenderingEngine *RenderingEngine::s_singleton = nullptr;
|
RenderingEngine *RenderingEngine::s_singleton = nullptr;
|
||||||
|
|
||||||
|
|
||||||
@ -138,7 +147,7 @@ RenderingEngine::RenderingEngine(IEventReceiver *receiver)
|
|||||||
params.EventReceiver = receiver;
|
params.EventReceiver = receiver;
|
||||||
params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
|
params.HighPrecisionFPU = g_settings->getBool("high_precision_fpu");
|
||||||
params.ZBufferBits = 24;
|
params.ZBufferBits = 24;
|
||||||
#if defined(__ANDROID__) || defined(__IOS__)
|
#ifdef __ANDROID__
|
||||||
params.PrivateData = porting::app_global;
|
params.PrivateData = porting::app_global;
|
||||||
#endif
|
#endif
|
||||||
#if ENABLE_GLES
|
#if ENABLE_GLES
|
||||||
|
@ -76,7 +76,7 @@ void set_default_settings()
|
|||||||
settings->setDefault("enable_remote_media_server", "true");
|
settings->setDefault("enable_remote_media_server", "true");
|
||||||
settings->setDefault("enable_client_modding", "true");
|
settings->setDefault("enable_client_modding", "true");
|
||||||
settings->setDefault("max_out_chat_queue_size", "20");
|
settings->setDefault("max_out_chat_queue_size", "20");
|
||||||
settings->setDefault("pause_on_lost_focus", "false");
|
settings->setDefault("pause_on_lost_focus", "true");
|
||||||
settings->setDefault("enable_register_confirmation", "false");
|
settings->setDefault("enable_register_confirmation", "false");
|
||||||
|
|
||||||
// Keymap
|
// Keymap
|
||||||
@ -248,7 +248,7 @@ void set_default_settings()
|
|||||||
settings->setDefault("transparency_sorting", "true");
|
settings->setDefault("transparency_sorting", "true");
|
||||||
settings->setDefault("texture_clean_transparent", "false");
|
settings->setDefault("texture_clean_transparent", "false");
|
||||||
settings->setDefault("texture_min_size", "0");
|
settings->setDefault("texture_min_size", "0");
|
||||||
settings->setDefault("ambient_occlusion_gamma", "2.2");
|
settings->setDefault("ambient_occlusion_gamma", "1.8");
|
||||||
#if ENABLE_GLES
|
#if ENABLE_GLES
|
||||||
settings->setDefault("enable_shaders", "false");
|
settings->setDefault("enable_shaders", "false");
|
||||||
#else
|
#else
|
||||||
@ -528,7 +528,6 @@ void set_default_settings()
|
|||||||
settings->setDefault("emergequeue_limit_diskonly", "16");
|
settings->setDefault("emergequeue_limit_diskonly", "16");
|
||||||
settings->setDefault("emergequeue_limit_generate", "16");
|
settings->setDefault("emergequeue_limit_generate", "16");
|
||||||
settings->setDefault("curl_verify_cert", "false");
|
settings->setDefault("curl_verify_cert", "false");
|
||||||
settings->setDefault("pause_on_lost_focus", "true");
|
|
||||||
settings->setDefault("max_objects_per_block", "16");
|
settings->setDefault("max_objects_per_block", "16");
|
||||||
settings->setDefault("doubletap_jump", "true");
|
settings->setDefault("doubletap_jump", "true");
|
||||||
settings->setDefault("gui_scaling_filter_txr2img", "false");
|
settings->setDefault("gui_scaling_filter_txr2img", "false");
|
||||||
|
@ -74,7 +74,7 @@ void set_light_table(float gamma)
|
|||||||
params.gamma = rangelim(gamma, 0.33f, 3.0f);
|
params.gamma = rangelim(gamma, 0.33f, 3.0f);
|
||||||
|
|
||||||
// Boundary values should be fixed
|
// Boundary values should be fixed
|
||||||
light_LUT[0] = 10;
|
light_LUT[0] = 20;
|
||||||
light_LUT[LIGHT_SUN] = 255;
|
light_LUT[LIGHT_SUN] = 255;
|
||||||
|
|
||||||
for (size_t i = 1; i < LIGHT_SUN; i++) {
|
for (size_t i = 1; i < LIGHT_SUN; i++) {
|
||||||
|
@ -1437,6 +1437,8 @@ void Client::handleCommand_LocalPlayerAnimations(NetworkPacket* pkt)
|
|||||||
*pkt >> player->local_animations[2];
|
*pkt >> player->local_animations[2];
|
||||||
*pkt >> player->local_animations[3];
|
*pkt >> player->local_animations[3];
|
||||||
*pkt >> player->local_animation_speed;
|
*pkt >> player->local_animation_speed;
|
||||||
|
|
||||||
|
player->last_animation = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Client::handleCommand_EyeOffset(NetworkPacket* pkt)
|
void Client::handleCommand_EyeOffset(NetworkPacket* pkt)
|
||||||
|
@ -286,10 +286,10 @@ inline const char *getPlatformName()
|
|||||||
defined(__NetBSD__) || defined(__OpenBSD__)
|
defined(__NetBSD__) || defined(__OpenBSD__)
|
||||||
"BSD"
|
"BSD"
|
||||||
#elif defined(__APPLE__) && defined(__MACH__)
|
#elif defined(__APPLE__) && defined(__MACH__)
|
||||||
#if TARGET_OS_MAC
|
#if TARGET_OS_IPHONE
|
||||||
"OSX"
|
|
||||||
#elif TARGET_OS_IPHONE
|
|
||||||
"iOS"
|
"iOS"
|
||||||
|
#elif TARGET_OS_MAC
|
||||||
|
"OSX"
|
||||||
#else
|
#else
|
||||||
"Apple"
|
"Apple"
|
||||||
#endif
|
#endif
|
||||||
|
@ -755,6 +755,10 @@ bool ModApiMainMenu::mayModifyPath(std::string path)
|
|||||||
if (fs::PathStartsWith(path, fs::RemoveRelativePathComponents(porting::path_cache)))
|
if (fs::PathStartsWith(path, fs::RemoveRelativePathComponents(porting::path_cache)))
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
|
std::string path_share = fs::RemoveRelativePathComponents(porting::path_share);
|
||||||
|
if (fs::PathStartsWith(path, path_share + DIR_DELIM "builtin"))
|
||||||
|
return true;
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user