mirror of
https://github.com/luanti-org/luanti.git
synced 2025-06-27 16:36:03 +00:00
Android progressbar fix (#5601)
* Fix progressbar for Android Fixes #5599 Fixed #5403 * draw_load_screen: use texturesource this permits to unify texture loading code * scale progress bar * Add gl version check for GL_OES_texture_npot. This fixed the texture on loading screen * Remove two sanity checks pointed by @celeron55 * sfan5 comments + android ratio fixes
This commit is contained in:
parent
d17636484d
commit
73de17afa8
5 changed files with 42 additions and 33 deletions
14
src/game.cpp
14
src/game.cpp
|
@ -1725,9 +1725,10 @@ bool Game::init(
|
|||
u16 port,
|
||||
const SubgameSpec &gamespec)
|
||||
{
|
||||
texture_src = createTextureSource(device);
|
||||
|
||||
showOverlayMessage(wgettext("Loading..."), 0, 0);
|
||||
|
||||
texture_src = createTextureSource(device);
|
||||
shader_src = createShaderSource(device);
|
||||
|
||||
itemdef_manager = createItemDefManager();
|
||||
|
@ -2183,12 +2184,14 @@ bool Game::getServerContent(bool *aborted)
|
|||
if (!client->itemdefReceived()) {
|
||||
const wchar_t *text = wgettext("Item definitions...");
|
||||
progress = 25;
|
||||
draw_load_screen(text, device, guienv, dtime, progress);
|
||||
draw_load_screen(text, device, guienv, texture_src,
|
||||
dtime, progress);
|
||||
delete[] text;
|
||||
} else if (!client->nodedefReceived()) {
|
||||
const wchar_t *text = wgettext("Node definitions...");
|
||||
progress = 30;
|
||||
draw_load_screen(text, device, guienv, dtime, progress);
|
||||
draw_load_screen(text, device, guienv, texture_src,
|
||||
dtime, progress);
|
||||
delete[] text;
|
||||
} else {
|
||||
std::stringstream message;
|
||||
|
@ -2212,7 +2215,7 @@ bool Game::getServerContent(bool *aborted)
|
|||
|
||||
progress = 30 + client->mediaReceiveProgress() * 35 + 0.5;
|
||||
draw_load_screen(utf8_to_wide(message.str()), device,
|
||||
guienv, dtime, progress);
|
||||
guienv, texture_src, dtime, progress);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -4357,7 +4360,8 @@ inline void Game::limitFps(FpsControl *fps_timings, f32 *dtime)
|
|||
void Game::showOverlayMessage(const wchar_t *msg, float dtime,
|
||||
int percent, bool draw_clouds)
|
||||
{
|
||||
draw_load_screen(msg, device, guienv, dtime, percent, draw_clouds);
|
||||
draw_load_screen(msg, device, guienv, texture_src, dtime, percent,
|
||||
draw_clouds);
|
||||
delete[] msg;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue