Skip to content

Commit

Permalink
stuff
Browse files Browse the repository at this point in the history
  • Loading branch information
igagis committed Dec 25, 2024
1 parent 7b21618 commit b7234db
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/ruisapp/glue/sdl/glue.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -457,12 +457,16 @@ class window_wrapper : public utki::destructable
namespace {
ruisapp::application::directories get_application_directories(std::string_view app_name)
{
char* base_dir = SDL_GetPrefPath("", std::string(app_name).c_str());
utki::scope_exit base_dir_scope_exit([&]() {
SDL_free(base_dir);
});

ruisapp::application::directories dirs;

// TODO:
dirs.cache = utki::cat(".cache/"sv, app_name);
dirs.config = utki::cat(".config/"sv, app_name);
dirs.state = utki::cat(".local/state/"sv, app_name);
dirs.cache = utki::cat(base_dir, "cache/"sv);
dirs.config = utki::cat(base_dir, "config/"sv);
dirs.state = utki::cat(base_dir, "state/"sv);

// std::cout << "cache dir = " << dirs.cache << std::endl;
// std::cout << "config dir = " << dirs.config << std::endl;
Expand Down

0 comments on commit b7234db

Please sign in to comment.