~brandontschaefer/libsdl/enable-mir-support-ffe

« back to all changes in this revision

Viewing changes to test/testdrawchessboard.c

  • Committer: Package Import Robot
  • Author(s): Manuel A. Fernandez Montecelo, Felix Geyer
  • Date: 2013-12-28 12:31:19 UTC
  • mfrom: (1.1.3)
  • Revision ID: package-import@ubuntu.com-20131228123119-e0k27gckmnzskfgb
Tags: 2.0.1+dfsg1-1
* New upstream release (Closes: #728974)
  - Remove patch applied upstream:
    bug-723797-false_positives_in_mouse_wheel_code.patch
* Bump Standards-Version to 3.9.5, no changes needed.

[ Felix Geyer ]
* Import upstream gpg key for uscan to verify the orig tarball.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
        SDL_Surface *surface;
55
55
        SDL_Renderer *renderer;
56
56
 
 
57
    /* Enable standard application logging */
 
58
    SDL_LogSetPriority(SDL_LOG_CATEGORY_APPLICATION, SDL_LOG_PRIORITY_INFO);
 
59
 
57
60
        /* Initialize SDL */
58
61
        if(SDL_Init(SDL_INIT_VIDEO) != 0)
59
62
        {
60
 
                fprintf(stderr,"SDL_Init fail : %s\n", SDL_GetError());
 
63
                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "SDL_Init fail : %s\n", SDL_GetError());
61
64
                return 1;
62
65
        }
63
66
 
66
69
        window = SDL_CreateWindow("Chess Board", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, 640, 480, SDL_WINDOW_SHOWN);
67
70
        if(!window)
68
71
        {
69
 
                fprintf(stderr,"Window creation fail : %s\n",SDL_GetError());
 
72
                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Window creation fail : %s\n",SDL_GetError());
70
73
                return 1;
71
74
        }       
72
75
        surface = SDL_GetWindowSurface(window);
73
76
        renderer = SDL_CreateSoftwareRenderer(surface);
74
77
        if(!renderer)
75
78
        {
76
 
                fprintf(stderr,"Render creation for surface fail : %s\n",SDL_GetError());
 
79
                SDL_LogError(SDL_LOG_CATEGORY_APPLICATION, "Render creation for surface fail : %s\n",SDL_GetError());
77
80
                return 1;
78
81
        }
79
82