Added add button to file selector that sends user to phone drawing program

This commit is contained in:
Yousef Khadadeh 2026-04-26 13:21:05 +03:00
parent 7274a9396b
commit 97d299a346
7 changed files with 107 additions and 4 deletions

View file

@ -4,6 +4,7 @@
#include "Helpers/FileDownloader.hpp"
#include "Screens/FileSelectScreen.hpp"
#include "Screens/DesktopDrawingProgramScreen.hpp"
#include "Screens/PhoneDrawingProgramScreen.hpp"
#include "VersionConstants.hpp"
#include "include/gpu/GpuTypes.h"
#include <SDL3/SDL_filesystem.h>
@ -525,6 +526,8 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) {
mS.m->window.canCreateSurfaces = true;
resize_window(mS);
mS.m->screen = std::make_unique<PhoneDrawingProgramScreen>(*mS.m);
if(listOfFilesToOpenFromCommand.empty()) {
mS.m->create_new_tab({
.isClient = false
@ -539,8 +542,6 @@ SDL_AppResult SDL_AppInit(void **appstate, int argc, char **argv) {
}
}
mS.m->screen = std::make_unique<DrawingProgramScreen>(*mS.m);
mS.m->update(); // Run update once to make sure that callbacks dont crash
#ifdef NDEBUG