diff --git a/main.cpp b/main.cpp index a1c5a37..3d324c1 100644 --- a/main.cpp +++ b/main.cpp @@ -1,19 +1,26 @@ #include "raylib.h" #include "Tree.hpp" -const int screenWidth = 800; -const int screenHeight = 800; - int main(void) { - InitWindow(screenWidth, screenHeight, "raylib"); + char *name = "treender"; + int screenWidth = 800; + int screenHeight = 800; +#ifdef MY_ANDROID + InitWindow(0, 0, name); + screenWidth = GetScreenWidth(); + screenHeight = GetScreenHeight(); +#else + InitWindow(screenWidth, screenHeight, name); +#endif SetTargetFPS(60); { Tree tree(800); tree.newTree(); - Rectangle dest = {0, 0, screenWidth, screenHeight}; + int yPos = (screenHeight - screenWidth) / 2; + Rectangle dest = {yPos, 0, screenWidth, screenWidth}; float rotation = 0.0f; while (!WindowShouldClose()) {