Advertisement
Guest User

Untitled

a guest
Sep 5th, 2017
179
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.45 KB | None | 0 0
  1. #include <iostream>
  2. #include "SDLtest.h"
  3.  
  4. using namespace std;
  5.  
  6. bool SDLtest :: Initialise() {
  7.    
  8.     if(SDL_Init(SDL_INIT_VIDEO) > 0) {
  9.         cout << "SDL_Init error " << SDL_GetError() << "\n";
  10.         return false;
  11.     }
  12.    
  13.     window = SDL_CreateWindow("SDLtest", SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 640, 480, 0);
  14.     if(window == nullptr) {
  15.         cout << "SDL_CreateWindow error " << SDL_GetError() << "\n";
  16.         SDL_DestroyWindow(window);
  17.         return false;
  18.     }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement