Edited: Look at comments below. Short version: Screen simply flashes when I try to run program.
int main(int argc, char** args)
{
bool quit = false;
std::ofstream out("error.txt");
if(init() == false)
{
return 1;
}
if (load_files() == false)
{
return 1;
}
// Render the text
message = TTF_RenderText_Solid(font, "The quick brown fox jumps over the lazy dog", textColor);
// If there was an error in rendering the text
if (message == NULL)
{
return 1;
}
// Apply the images to the screen
apply_surface(0,0, background, screen);
apply_surface(0,150, message, screen);
// Update the screen
if (SDL_Flip(screen) == -1)
{
std::cout << SDL_GetError() << '\n';
return 1;
}
while (quit == false)
{
while (SDL_PollEvent(&event))
{
if (event.type == SDL_QUIT)
{
quit = true;
}
}
}
clean_up();
return 0;
}