When I run this bit of code through GCC I get this warning on the line where I set info to SDL_GetVideoInfo().
warning: initialization discards qualifiers from pointer target type
int main(int argc, char** argv) {
SDL_Init(SDL_INIT_EVERYTHING);
SDL_VideoInfo* info = SDL_GetVideoInfo();
int SCREEN_WIDTH = info->current_w;
int SCREEN_HEIGHT = info->current_h;
printf("hardware acceleration? %s\n", info->hw_available == 1 ? "yes" : "no");
printf("memory available in kilobytes: %d\n", info->video_mem);
SDL_Quit();
return 0;
}
Does anyone know how I can change the code so I can get around that warning?