Ledger Nano X - The secure hardware wallet
SHARE
TWEET

Untitled

a guest Apr 6th, 2020 165 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1.     #include <SDL2/SDL.h>
  2.   2 #include <stdio.h>
  3.   3 #include "draw.h"
  4.   4
  5.   5 void    CreateEnv(SDL_Window *e, SDL_Renderer *r)
  6.   6 {
  7.   7     if(SDL_Init(SDL_INIT_VIDEO) == -1)
  8.   8     {
  9.   9         ErrLog("Init video");
  10.  10     }
  11.  11
  12.  12     e = SDL_CreateWindow("Projeckt", SDL_WINDOWPOS_UNDEFINED, SDL_WINDOWPOS_UNDEFINED, WIN_WIDTH, WIN_HEIGHT, SDL_WINDOW_SHOWN); //SDL_NOFRAME
  13.  13     if(e == NULL)
  14.  14     {
  15.  15         ErrLog("CreateWindow");
  16.  16     }
  17.  17 /*    r = SDL_CreateRenderer(e, -1, SDL_RENDERER_PRESENTVSYNC);
  18.  18     if(r == NULL)
  19.  19     {
  20.  20         ErrLog("CreateRenderer");
  21.  21     }*/
  22.  22 }
  23.  23
  24.  24 void    DrawToRender(SDL_Renderer *r)
  25.  25 {
  26.  26     SDL_SetRenderDrawColor(r, 255, 220, 220, 255);
  27.  27     SDL_RenderClear(r);
  28.  28     printf("testi\n");
  29.  29     SDL_RenderPresent(r);
  30.  30 }
  31.  31
  32.  32 void    CleanQuit()
  33.  33 {
  34.  34     //SDL_DestroyRenderer(r);
  35.  35     //SDL_DestroyWindow(e);
  36.  36     SDL_Quit();
  37.  37 }
  38.  38                                                                                                                                                                                              
  39.  39 void    ErrLog(char *msg)
  40.  40 {
  41.  41     fprintf(stderr, "erreur %s : %s\n", msg, SDL_GetError());
  42.  42     exit(EXIT_FAILURE);
  43.  43 }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top