mirror of
https://github.com/luanti-org/luanti.git
synced 2025-10-05 19:31:04 +00:00
Irrlicht support changes (#14383)
This commit is contained in:
parent
84dd812da4
commit
e3cc26cb7c
8 changed files with 49 additions and 85 deletions
|
@ -198,11 +198,18 @@ bool ClientLauncher::run(GameStartData &start_data, const Settings &cmd_args)
|
|||
while (m_rendering_engine->run() && !*kill &&
|
||||
!g_gamecallback->shutdown_requested) {
|
||||
// Set the window caption
|
||||
#if IRRLICHT_VERSION_MT_REVISION >= 15
|
||||
auto driver_name = m_rendering_engine->getVideoDriver()->getName();
|
||||
#else
|
||||
auto driver_name = wide_to_utf8(m_rendering_engine->getVideoDriver()->getName());
|
||||
#endif
|
||||
std::string caption = std::string(PROJECT_NAME_C) +
|
||||
" " + g_version_hash +
|
||||
" [" + gettext("Main Menu") + "]" +
|
||||
" [" + driver_name + "]";
|
||||
|
||||
m_rendering_engine->get_raw_device()->
|
||||
setWindowCaption((utf8_to_wide(PROJECT_NAME_C) +
|
||||
L" " + utf8_to_wide(g_version_hash) +
|
||||
L" [" + wstrgettext("Main Menu") + L"]" +
|
||||
L" [" + m_rendering_engine->getVideoDriver()->getName() + L"]" ).c_str());
|
||||
setWindowCaption(utf8_to_wide(caption).c_str());
|
||||
|
||||
try { // This is used for catching disconnects
|
||||
|
||||
|
|
|
@ -1551,18 +1551,20 @@ bool Game::createClient(const GameStartData &start_data)
|
|||
|
||||
/* Set window caption
|
||||
*/
|
||||
std::wstring str = utf8_to_wide(PROJECT_NAME_C);
|
||||
str += L" ";
|
||||
str += utf8_to_wide(g_version_hash);
|
||||
str += L" [";
|
||||
str += simple_singleplayer_mode ? wstrgettext("Singleplayer")
|
||||
: wstrgettext("Multiplayer");
|
||||
str += L"]";
|
||||
str += L" [";
|
||||
str += driver->getName();
|
||||
str += L"]";
|
||||
#if IRRLICHT_VERSION_MT_REVISION >= 15
|
||||
auto driver_name = driver->getName();
|
||||
#else
|
||||
auto driver_name = wide_to_utf8(driver->getName());
|
||||
#endif
|
||||
std::string str = std::string(PROJECT_NAME_C) +
|
||||
" " + g_version_hash + " [";
|
||||
str += simple_singleplayer_mode ? gettext("Singleplayer")
|
||||
: gettext("Multiplayer");
|
||||
str += "] [";
|
||||
str += driver_name;
|
||||
str += "]";
|
||||
|
||||
device->setWindowCaption(str.c_str());
|
||||
device->setWindowCaption(utf8_to_wide(str).c_str());
|
||||
|
||||
LocalPlayer *player = client->getEnv().getLocalPlayer();
|
||||
player->hurt_tilt_timer = 0;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue