SDL graphics problem - program installed using AI - Advanced Installer Community
bilsch01
Posts: 2
Joined: Fri Sep 02, 2016 11:24 pm

SDL graphics problem - program installed using AI

Please see the simple code below. Program built using Win7 and SDL2-2.0.4. It works fine - displays a red background inside an SDL frame. But when I build a windows .msi installer program with it (using Advanced Installer by Caphyon Ltd.) and install it on a fresh Windows system (no SDL package previously installed) it displays the SDL frame with nothing inside. I mean inside the frame it is clear and the desktop shows through. I tried the same with other SDL programs and still get a SDL frame with nothing inside. It seems like it could be a problem with Advanced Installer program, but maybe SDL is involved. Does anybody here know what it could be?

Thanks. Bill S.

Code: Select all

#define SDL_MAIN_HANDLED		// avoids WinMain16
#include <SDL.h>

int main(int argc, char* argv[])
{
	SDL_SetMainReady();		// avoids WinMain16
        SDL_Window* window;
        SDL_Renderer* renderer;

        if (SDL_Init(SDL_INIT_VIDEO) < 0)
	return 1;
        window = SDL_CreateWindow("SDL_RenderClear",
                 SDL_WINDOWPOS_CENTERED, SDL_WINDOWPOS_CENTERED, 512, 512, 0);
	renderer =  SDL_CreateRenderer(window, 0, SDL_RENDERER_ACCELERATED);
        SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
        SDL_RenderClear(renderer);
        SDL_RenderPresent(renderer);
        SDL_Delay(5000);
	SDL_DestroyRenderer(renderer);	//   quit SDL 
	SDL_DestroyWindow(window);
	SDL_Quit();

        return 0;
}
bilsch01
Posts: 2
Joined: Fri Sep 02, 2016 11:24 pm

OK, I GOT IT SOLVED

Thanks. Bill S.
Eusebiu
Posts: 4971
Joined: Wed Nov 14, 2012 2:04 pm

Re: SDL graphics problem - program installed using AI

Hi Bill and welcome to Advanced Installer forums.

I'm glad you solved the problem. Just let us know anytime you need help.

Best regards,
Eusebiu
Eusebiu Aria - Advanced Installer Team
Follow us: Twitter - Facebook - YouTube

Return to “Common Problems”