Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Load Assets from path relative to the executable #6

Open
RicardoEPRodrigues opened this issue Jul 7, 2018 · 3 comments
Open

Load Assets from path relative to the executable #6

RicardoEPRodrigues opened this issue Jul 7, 2018 · 3 comments
Labels

Comments

@RicardoEPRodrigues
Copy link
Owner

It'd be best to load assets from a path relative to the main executable, rather than from a path relative to the current working directory (cwd).

#1 (comment)

@RicardoEPRodrigues

This comment has been minimized.

@RicardoEPRodrigues
Copy link
Owner Author

Solution is using the SDL_GetBasePath like so:

#ifdef DEBUG
        char *base_path = SDL_GetBasePath();
        if (base_path) {
            ThreeEngine::Debug::Log("Base Path: %s\n", base_path);
        }
        free(base_path);
#endif

@RicardoEPRodrigues
Copy link
Owner Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant