Exemplo n.º 1
0
Arquivo: osint.c Projeto: visy/vecx
int main(int argc, char *argv[]){
	if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0){
		fprintf(stderr, "Failed to initialize SDL: %s\n", SDL_GetError());
		exit(-1);
	}

	resize(330*3/2, 410*3/2);

	if(argc > 1)
		cartfilename = argv[1];
	if(argc > 2)
		load_overlay(argv[2]);

	init();

	e8910_init_sound();
	osint_emuloop();
#ifdef EMSCRIPTEN
	emscripten_set_main_loop(mainloop, 60, 1);
#else
	for(;;)mainloop();
#endif
	e8910_done_sound();
	SDL_Quit();

	return 0;
}
Exemplo n.º 2
0
int main(int argc, char *argv[]){
#ifndef _WIN32
    SDL_putenv("DINGOO_IGNORE_OS_EVENTS=1");  //HACK to fix "push long time on X" problem
#endif
	if (SDL_Init(SDL_INIT_VIDEO) < 0)
    {
	    fprintf(stderr, "Failed to initialize video: %s\n", SDL_GetError());
	    exit(-1);
    }
    atexit(SDL_Quit);

#ifdef _WIN32
    SDL_putenv("SDL_VIDEO_WINDOW_POS=300,200");
    SDL_WM_SetCaption("Vectrex SDL", "Vectrex SDL");

    resize(240, 320, 0);
#else
    resize(320, 240, 1);
#endif

#ifdef _WIN32
    if (argc > 1) cartfilename = argv[1];
#else
    if (stricmp(argv[0], "ROM.VECX") != 0)  // If user selected ROM.VECX cartridge then don't use any cartridge
    {
	    cartfilename = argv[0];  // In SIM files argv[0] contains the target to be loaded.
    }
#endif

	init();
    e8910_init_sound();

	osint_emuloop();

    e8910_done_sound();
    SDL_Quit();

	return 0;
}
Exemplo n.º 3
0
int main(int argc, char *argv[]){
	if(SDL_Init(SDL_INIT_VIDEO | SDL_INIT_AUDIO) < 0){
		fprintf(stderr, "Failed to initialize SDL: %s\n", SDL_GetError());
		exit(-1);
	}

	resize(330*3/2, 410*3/2);

	if(argc > 1)
		cartfilename = argv[1];
	if(argc > 2)
		load_overlay(argv[2]);

	init();

	e8910_init_sound();
	osint_emuloop();
	e8910_done_sound();
	SDL_Quit();

	return 0;
}