Advertisement
Guest User

Untitled

a guest
May 24th, 2017
51
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.47 KB | None | 0 0
  1. void VideoOptionsMenu::resizeWindow(SDL_Surface* vidSur)
  2. {
  3. input_width_int = atoi(input_width_string);
  4. input_height_int = atoi(input_height_string);
  5.  
  6.  
  7. FILE* videoFile;
  8.  
  9. videoFile = fopen("game_resources/preferences/video_preferences.dat", "w");
  10.  
  11. fprintf(videoFile, "%d %d", input_width_int, input_height_int);
  12.  
  13.  
  14. fclose(videoFile);
  15.  
  16. SDL_FreeSurface(vidSur);
  17. vidSur = SDL_SetVideoMode (input_width_int, input_height_int, 16, SDL_OPENGL);
  18.  
  19.  
  20.  
  21.  
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement