Starter project for SDL2.
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

20 lignes
613 B

  1. #include "IZ_video.h"
  2. void IZ_SaveVideoConfig(IZ_VideoConfig* config) {
  3. char config_path[128];
  4. IZ_GetConfigPath(config_path);
  5. ini_putl("Video", "Width", config->width, config_path);
  6. ini_putl("Video", "Height", config->height, config_path);
  7. ini_putl("Video", "MaxFps", config->max_fps, config_path);
  8. }
  9. void IZ_LoadVideoConfig(IZ_VideoConfig* config) {
  10. char config_path[128];
  11. IZ_GetConfigPath(config_path);
  12. config->width = ini_getl("Video", "Width", 640l, config_path);
  13. config->height = ini_getl("Video", "Height", 480l, config_path);
  14. config->max_fps = ini_getl("Video", "MaxFps", 30, config_path);
  15. }