testfilesystem.c 954 B

123456789101112131415161718192021222324252627282930313233
  1. /*
  2. Copyright (C) 1997-2014 Sam Lantinga <slouken@libsdl.org>
  3. This software is provided 'as-is', without any express or implied
  4. warranty. In no event will the authors be held liable for any damages
  5. arising from the use of this software.
  6. Permission is granted to anyone to use this software for any purpose,
  7. including commercial applications, and to alter it and redistribute it
  8. freely.
  9. */
  10. /* Simple test of power subsystem. */
  11. #include <stdio.h>
  12. #include "SDL.h"
  13. int
  14. main(int argc, char *argv[])
  15. {
  16. /* Enable standard application logging */
  17. SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
  18. if (SDL_Init(0) == -1) {
  19. SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init() failed: %s\n", SDL_GetError());
  20. return 1;
  21. }
  22. SDL_Log("base path: '%s'\n", SDL_GetBasePath());
  23. SDL_Log("pref path: '%s'\n", SDL_GetPrefPath("libsdl", "testfilesystem"));
  24. SDL_Quit();
  25. return 0;
  26. }