[SDL] Nothing displayd inside frame - instal by Advanced Installer

bilsch01 king621 at comcast.net
Fri Sep 2 15:17:02 PDT 2016


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:

#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;
}







-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.libsdl.org/pipermail/sdl-libsdl.org/attachments/20160902/cbc82ba8/attachment.htm>


More information about the SDL mailing list