Esempio n. 1
0
//---------------------------------------------------------------------------------------------------------------------------------------------------
static void Process_GRID_BRIGHTNESS(uint8 *buffer)
{
    int intVal = 0;
    if (SCPI_FirstIsInt(buffer, &intVal, 0, 100))
    {
        set.display.brightnessGrid = intVal;
        Display_RunAfterDraw(OnChangeValueDisplayBrightness);
    }
    else
    {
        static const MapElement map[] =
        {
            {"?", 0},
            {0}
        };

        ENTER_ANALYSIS
            if (0 == value)
            {
                extern ColorType colorTypeGrid;
                Color_Init(&colorTypeGrid);
                SCPI_SEND(":DISPLAY:GRID:BRIGHTNESS %d", (int)(colorTypeGrid.brightness * 100.0f));
            }
        LEAVE_ANALYSIS
    }
}
Esempio n. 2
0
//------------------------------------------------------------------------------------------------------------------------------------------------------
static void Process_GRID(uint8 *buffer)
{
    static const MapElement map[] =
    {
        {"TYPE1", 0},
        {"TYPE2", 1},
        {"TYPE3", 2},
        {"TYPE4", 3},
        {"?", 4},
        {0}
    };

    int intVal = 0;
    if (SCPI_FirstIsInt(buffer, &intVal, 0, 100))
    {
        set.display.brightnessGrid = (int16)intVal;
        OnChange_Grid_Brightness();
        return;
    }

    ENTER_ANALYSIS
        if (value < 4) { set.display.typeGrid = (TypeGrid)value; }
        else if (4 == value)
        {
            extern ColorType colorTypeGrid;
            Color_Init(&colorTypeGrid, false);
            SCPI_SEND(":DISPLAY:GRID %s %d", map[set.display.typeGrid].key, (int)(colorTypeGrid.brightness * 100.0f));
        }
    LEAVE_ANALYSIS
}
Esempio n. 3
0
bool_t Context_Init(const tchar_t* Name,const tchar_t* Version,int Id,const tchar_t* CmdLine,void* Application)
{
	context* p = malloc(sizeof(context));
	if (!p) return 0;

#ifdef PREALLOC
	{ int i; for (i=0;i<PREALLOC;++i) q[i] = malloc(65536); }
#endif

	memset(p,0,sizeof(context));
	p->Version = CONTEXT_VERSION;
	p->ProgramId = Id;
	p->ProgramName = Name;
	p->ProgramVersion = Version;
	p->CmdLine = CmdLine;
	p->Lang = DefaultLang();
	p->StartUpMemory = AvailMemory();
	p->LowMemory = p->StartUpMemory < LOWMEMORY_LIMIT;
	p->Application = Application;

	SetContext(p);

	Mem_Init();
	DynCode_Init();
	String_Init();
	PCM_Init();
	Blit_Init();
	Node_Init();
	Platform_Init();
	Stream_Init();
	Advanced_Init();
	Flow_Init();
	Codec_Init();
	Audio_Init();
	Video_Init();
	Format_Init();
	Playlist_Init();
	FormatBase_Init();
	NullOutput_Init();
	RawAudio_Init();
	RawImage_Init();
	Timer_Init();
	IDCT_Init();
	Overlay_Init();
	M3U_Init();
	PLS_Init();
	ASX_Init();
	WaveOut_Init();
	SoftIDCT_Init();
#if defined(CONFIG_SUBS)
	SubTitle_Init();
#endif
#if defined(TARGET_PALMOS)
	OverlayHIRES_Init();
	//Win_Init();
	//About_Init();
	//BenchResult_Init();
	//MediaInfo_Init();
	//Settings_Init();
	ASF_Init();
	AVI_Init();
	WAV_Init();
	MP4_Init();
	MPG_Init();
	NSV_Init();
	Law_Init();
	ADPCM_Init();
#elif defined(TARGET_WIN32) || defined(TARGET_WINCE)
#if defined(TARGET_WINCE)
	if (QueryPlatform(PLATFORM_TYPENO) != TYPE_SMARTPHONE)
	{
		OverlayRAW_Init();
		OverlayGAPI_Init();
	}
	else
	{
		OverlayGAPI_Init(); // prefer GAPI with smartphones (Sagem MyS-7 crashes with Raw FrameBuffer?)
		OverlayRAW_Init();
	}
	OverlayDirect_Init();
	OverlayS1D13806_Init();
#else
	OverlayConsole_Init();
#endif
	OverlayXScale_Init();
	OverlayDDraw_Init(); // after GAPI and RAW and XScale
	OverlayFlyTV_Init();
	OverlayGDI_Init();
#elif defined(TARGET_SYMBIAN)
	OverlaySymbian_Init();
#endif
#ifdef NO_PLUGINS
	Static_Init();
#else
	Plugins_Init();
#endif
	Association_Init(); // after all formats are registered
	Color_Init(); 
	Equalizer_Init();
	Player_Init(); // after all output drivers are registered
	return 1;
}