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.
#define SDL_MAIN_HANDLED // avoids WinMain16
int main(int argc, char* argv)
SDL_SetMainReady(); // avoids WinMain16
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;