fix: changed android defines
This commit is contained in:
@@ -29,7 +29,7 @@ static std::unique_ptr<td::gui::GameMenu> gameMenu;
|
||||
static std::unique_ptr<td::gui::FrameMenu> frameMenu;
|
||||
|
||||
|
||||
void initWidgets(){
|
||||
void initWidgets() {
|
||||
mainMenu = std::make_unique<td::gui::MainMenu>(client.get());
|
||||
gameMenu = std::make_unique<td::gui::GameMenu>(client.get());
|
||||
frameMenu = std::make_unique<td::gui::FrameMenu>(client.get());
|
||||
@@ -73,9 +73,11 @@ void tick() {
|
||||
|
||||
lastTime = td::utils::getTime();
|
||||
}
|
||||
|
||||
void render() {
|
||||
tick();
|
||||
beginFrame();
|
||||
|
||||
client->render();
|
||||
if (client->isConnected())
|
||||
gameMenu->render();
|
||||
@@ -85,6 +87,7 @@ void render() {
|
||||
if (demo_open)
|
||||
ImGui::ShowDemoWindow(&demo_open);
|
||||
frameMenu->render();
|
||||
|
||||
endFrame();
|
||||
}
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
#include "Dirent/dirent.h"
|
||||
#include <windows.h>
|
||||
#else
|
||||
#include "dirent.h"
|
||||
#include <dirent.h>
|
||||
#endif // defined (WIN32) || defined (_WIN32)
|
||||
|
||||
namespace imgui_addons
|
||||
@@ -1156,6 +1156,23 @@ namespace imgui_addons
|
||||
if(path_max_def)
|
||||
buffer = new char[PATH_MAX];
|
||||
|
||||
#ifdef __ANDROID__
|
||||
|
||||
char* real_path = realpath("/storage/emulated/0/Download", buffer);
|
||||
if (real_path == nullptr)
|
||||
{
|
||||
current_path = "/storage/emulated/0/Download";
|
||||
current_dirlist.push_back("/storage/emulated/0/Download");
|
||||
}
|
||||
else
|
||||
{
|
||||
current_path = std::string(real_path);
|
||||
current_path += "/";
|
||||
parsePathTabs(current_path);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
char* real_path = realpath("./", buffer);
|
||||
if (real_path == nullptr)
|
||||
{
|
||||
@@ -1169,6 +1186,8 @@ namespace imgui_addons
|
||||
parsePathTabs(current_path);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
if(path_max_def)
|
||||
delete[] buffer;
|
||||
else
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "render/shaders/EntityShader.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
static const char vertexSource[] =
|
||||
R"(#version 300 es
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
#include <glm/gtc/type_ptr.hpp>
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
#include <android/log.h>
|
||||
#endif
|
||||
|
||||
@@ -116,7 +116,7 @@ int ShaderProgram::loadShader(const std::string& source, GLenum type) {
|
||||
char error[size];
|
||||
glGetShaderInfoLog(shaderID, size, &size, error);
|
||||
std::cout << error << std::endl;
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
__android_log_print(ANDROID_LOG_ERROR, "TRACKERS", "Could not compile shader !\n %s", error);
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
|
||||
#include "render/shaders/WorldShader.h"
|
||||
|
||||
#ifdef ANDROID
|
||||
#ifdef __ANDROID__
|
||||
static const char vertexSource[] =
|
||||
R"(#version 300 es
|
||||
|
||||
|
||||
Reference in New Issue
Block a user