Nothing displayd inside frame - instal by Advanced Installer

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;

}

Thanks. Bill S.

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?

Maybe a different video driver?

If the video driver is triple buffered you may more calls to
SDL_RenderPresent to actually reach the display, try to change the code to
do:

for (int i = 0; i < 3; ++i) {
SDL_SetRenderDrawColor(renderer, 255, 0, 0, 255);
SDL_RenderClear(renderer);
SDL_RenderPresent(renderer);
}

… before waiting 5 secs–
Bye,
Gabry

Hi,

Are you including the SDL DDL’s in the EXE’s folder before creating the MSI installer file?
I’ve used Advanced Installer with SDL1/2 in the past and did not have any issues…------------------------
JeZxLee
JessePalser <AT> GMail <DOT> com
16BitSoft Inc.
Video Game Design Studio
www.16BitSoft.com