🛠️🐜 Antkeeper superbuild with dependencies included https://antkeeper.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

36 lines
930 B

  1. /*
  2. Copyright (C) 1997-2022 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. #include "SDL.h"
  11. int main(int argc, char **argv)
  12. {
  13. int i;
  14. if (SDL_Init(SDL_INIT_VIDEO) == -1) {
  15. SDL_Log("SDL_Init failed: %s\n", SDL_GetError());
  16. return 1;
  17. }
  18. for (i = 1; i < argc; i++) {
  19. const char *url = argv[i];
  20. SDL_Log("Opening '%s' ...", url);
  21. if (SDL_OpenURL(url) == 0) {
  22. SDL_Log(" success!");
  23. } else {
  24. SDL_Log(" failed! %s", SDL_GetError());
  25. }
  26. }
  27. SDL_Quit();
  28. return 0;
  29. }
  30. /* vi: set ts=4 sw=4 expandtab: */