Exemple #1
0
void client_setup::process(const config_lua_table& cfg, game_window& window) {
	init(cfg, window);

	while (!should_quit) {
		session.local_entropy_profiler.new_measurement();
		auto precollected = window.collect_entropy(!cfg.debug_disable_cursor_clipping);
		session.local_entropy_profiler.end_measurement();

		if (process_exit_key(precollected))
			break;

		process_once(window, precollected);
	}
}
Exemple #2
0
/*  main  */
int main()  {
    
    char file_name[20]; // file name
    int row;    // counts the number of rows
    double avgA, avgB; // average values
    char choce[1]; //
    
    while (1) {
        
        /*  clear old data  */
        memset(file_name, 0, sizeof file_name);
        memset(subA, 0, sizeof subA);
        memset(subB, 0, sizeof subB);
        passCounter = 1;
        row = 0, avgA = 0, avgB = 0;
        
        for (int i = 0; i < limit; i++) { // clears all old cash
            memset(passed[i], 0, sizeof passed[i]);
            memset(data[i], 0, sizeof data[i]);
        }
        
        
        printf("\nPlease enter the student info file you wish to evaluate?\n");
        scanf("%s", file_name); // takes file name
        
        extract_once(file_name); // will extract file validity
        
        row = process_once();   // split people who passed and sub A and B into separate double array
        
        sort(row);  // will sort the data sheet
        
        avgA = getAverage(subA, row); // finds average
        avgB = getAverage(subB, row);
        
        print_once(row, passCounter, avgA, avgB, passed);
        
        /*  options */
        printf("do you want to run another file type 'y' else 'n' to exit\n");
        scanf("%s", choce);
        
        if (choce[0] == 'n') {
            break;
        }
        
    }
    
    return 0;
}   // end main
int main(int ac, char *av[])
{
    int  i, ret;

    LibRaw RawProcessor;
    if(ac<2) 
        {
            printf(
                "multirender_test - LibRaw %s sample. Performs 4 different renderings of one file\n"
                " %d cameras supported\n"
                "Usage: %s raw-files....\n"
                ,LibRaw::version(), LibRaw::cameraCount(),
                av[0]);
            return 0;
        }
    
    for (i=1;i<ac;i++)
        {

            printf("Processing file %s\n",av[i]);

            if( (ret = RawProcessor.open_file(av[i])) != LIBRAW_SUCCESS)
                {
                    fprintf(stderr,"Cannot open_file %s: %s\n",av[i],libraw_strerror(ret));
                    continue; // no recycle b/c open file will recycle itself
                }
            
            if( (ret = RawProcessor.unpack() ) != LIBRAW_SUCCESS)
                {
                    fprintf(stderr,"Cannot unpack %s: %s\n",av[i],libraw_strerror(ret));
                    continue;
                }
            process_once(RawProcessor,0,0,0,1,-1,av[i]); // default flip
            process_once(RawProcessor,1,0,1,2,-1,av[i]);
            process_once(RawProcessor,1,1,0,3,-1,av[i]); // default flip
            process_once(RawProcessor,1,1,0,4,1,av[i]); // flip 1
            process_once(RawProcessor,1,1,0,5,3,av[i]); // flip 3
            process_once(RawProcessor,1,1,0,6,1,av[i]); // 1 again same as 4
            process_once(RawProcessor,1,1,0,7,-1,av[i]); // default again, same as 3
            process_once(RawProcessor,0,0,0,8,-1,av[i]); // same as 1

            RawProcessor.recycle(); // just for show this call
        }
    return 0;
}