当前位置: 首页>>代码示例>>C++>>正文


C++ SetConfig函数代码示例

本文整理汇总了C++中SetConfig函数的典型用法代码示例。如果您正苦于以下问题:C++ SetConfig函数的具体用法?C++ SetConfig怎么用?C++ SetConfig使用的例子?那么, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了SetConfig函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: GameConfigKeys

void GameConfigKeys (unsigned int key, bool special, bool release, int x, int y) {
    if (release) return;
	switch (key) {
		case SDLK_q: Winsys.Quit (); break;
		case 27: Winsys.SetMode (g_game.prev_mode); break;
		case SDLK_TAB: if (curr_focus < 7) curr_focus++; else curr_focus = 0; break;
		case 13: 
			switch (curr_focus) {
				case 6: Winsys.SetMode (g_game.prev_mode); break;
				case 7: SetConfig (); break;
				default: SetConfig (); break;
			} break;
		case 276: 
			switch (curr_focus) {
				case 0: ToggleFullscreen (); break; 
				case 1: ChangeRes (-1); break;
				case 2: ChangeMusVol (-1); break;
				case 3: ChangeSoundVol (-1); break;
				case 4: ChangeDetail (-1); break;
				case 5: ChangeLanguage (-1); break;
			} break;
		case 275: 
			switch (curr_focus) {
				case 0: ToggleFullscreen (); break; 
				case 1: ChangeRes (1); break;
				case 2: ChangeMusVol (1); break;
				case 3: ChangeSoundVol (1); break;
				case 4: ChangeDetail (1); break;
				case 5: ChangeLanguage (1); break;
			} break;
		case 273: if (curr_focus > 0) curr_focus--; break;
		case 274: if (curr_focus < 7) curr_focus++; break;
	}
}
开发者ID:cdlewis,项目名称:extremetuxracer,代码行数:34,代码来源:game_config.cpp

示例2: SetConfig

void PlayerDriver::setLooping( int isLooping )
{
    m_bIsLooping = isLooping;
    if (m_bIsLooping)
    {
        SetConfig("FinishMode", FINISH_RESTART_TO_PREFETCH);
        SetConfig("LoopingInCurrentTrack", TRUE);
    }
}
开发者ID:zhxinx,项目名称:HelixInWebkit,代码行数:9,代码来源:PlayerDriver.cpp

示例3: SetConfig

void CommManager::DisconnectedNotify()
{
#ifdef _DEBUG
    SetConfig(1000 * 30, 1000 * 30);
#else
    SetConfig(1000 * 60 * 30, g_ConfigInfo.nTryConnectIntervalM * 60 * 1000);
#endif
    ::InterlockedExchange(&m_bConnected, FALSE);
    debugLog(_T("DISCONNECTED"));
}
开发者ID:benzeng,项目名称:trochilus,代码行数:10,代码来源:CommManager.cpp

示例4: SetConfig

// Return false if the serial configuration is not valid for the host.
bool
CeCosTestSerialFilter::VerifyConfig(CeCosSerial &pSer, ser_cfg_t* new_cfg)
{
    ser_cfg_t old_cfg;
    bool rc;

    // Try changing to the new config, recording the result. Then restore
    // the original config.
    rc = SetConfig(pSer, new_cfg, &old_cfg);
    SetConfig(pSer, &old_cfg, NULL);

    return rc;
}
开发者ID:Robertysc,项目名称:ecos,代码行数:14,代码来源:eCosTestSerialFilter.cpp

示例5: SetConfig

void    plDynamicTextMap::Create( uint32_t width, uint32_t height, bool hasAlpha, uint32_t extraWidth, uint32_t extraHeight )
{
    SetConfig( hasAlpha ? kARGB32Config : kRGB32Config );


    fVisWidth = (uint16_t)width;
    fVisHeight = (uint16_t)height;
    fHasAlpha = hasAlpha;

    for( fWidth = 1; fWidth < width + extraWidth; fWidth <<= 1 );
    for( fHeight = 1; fHeight < height + extraHeight; fHeight <<= 1 );

    // instead of allocating the fImage here, we'll wait for the first draw operation to be called (in IIsValid)
    fHasCreateBeenCalled = true;

    fRowBytes = fWidth << 2;
    fNumLevels = 1;
    fFlags |= plMipmap::kDontThrowAwayImage | plMipmap::kAutoGenMipmap;
    fCompressionType = plMipmap::kUncompressed;
    fUncompressedInfo.fType = plMipmap::UncompressedInfo::kRGB8888;

    // Destroy the old texture ref, if we have one. This should force the 
    // pipeline to recreate one more suitable for our use
    SetDeviceRef( nil );

    // Some init color
    SetFont( "Arial", 12 );
    hsColorRGBA color;
    color.Set( 0,0,1,1);
    SetTextColor( color );

    SetCurrLevel( 0 );
    plProfile_Inc(DynaTexts);

}
开发者ID:Asteral,项目名称:Plasma,代码行数:35,代码来源:plDynamicTextMap.cpp

示例6: KeyGUI

void CGameConfig::Keyb (unsigned int key, bool special, bool release, int x, int y) {
	if (release) return;

	if (key != SDLK_UP && key != SDLK_DOWN)
		KeyGUI(key, 0, release);
	switch (key) {
		case SDLK_q:
			State::manager.RequestQuit();
			break;
		case SDLK_ESCAPE:
			State::manager.RequestEnterState (*State::manager.PreviousState());
			break;
		case SDLK_RETURN:
			if (textbuttons[0]->focussed())
				State::manager.RequestEnterState (*State::manager.PreviousState());
			else if (textbuttons[1]->focussed())
				SetConfig ();
			break;
		case SDLK_UP:
			DecreaseFocus();
			break;
		case SDLK_DOWN:
			IncreaseFocus();
			break;
	}
}
开发者ID:dbluelle,项目名称:pandora-extremetuxracer,代码行数:26,代码来源:config_screen.cpp

示例7: Lock

bool OMXClock::Stop(bool lock)
{
	if (!GetComponent())
		return false;

	if (lock)
		Lock();

	OMX_ERRORTYPE omxErr = OMX_ErrorNone;
	OMX_TIME_CONFIG_CLOCKSTATETYPE clock;
	OMX_INIT_STRUCTURE(clock);

	clock.eState = OMX_TIME_ClockStateStopped;
	clock.nOffset = ToOMXTime(-1000LL * OMX_PRE_ROLL);

	omxErr = SetConfig(OMX_IndexConfigTimeClockState, &clock);
	if (omxErr != OMX_ErrorNone)
	{
		if (lock)
			Unlock();

		return false;
	}

	m_eState = clock.eState;

	m_lastMediaTime = 0.0f;

	if (lock)
		Unlock();

	return true;
}
开发者ID:VRocker,项目名称:DashPi,代码行数:33,代码来源:OMXClock.cpp

示例8: SetConfig

bool
FlarmDevice::SetRange(unsigned range, OperationEnvironment &env)
{
  NarrowString<32> buffer;
  buffer.Format("%d", range);
  return SetConfig("RANGE", buffer, env);
}
开发者ID:DRIZO,项目名称:xcsoar,代码行数:7,代码来源:Device.cpp

示例9: ConvertMarkersToTempoDialog

/******************************************************************************
* Dialogs                                                                     *
******************************************************************************/
void ConvertMarkersToTempoDialog (COMMAND_T* = NULL)
{
	static HWND hwnd = CreateDialog(g_hInst, MAKEINTRESOURCE(IDD_BR_MARKERS_TO_TEMPO), g_hwndParent, ConvertMarkersToTempoProc);

	if (g_convertMarkersToTempoDialog)
	{
		KillTimer(hwnd, 1);
		ShowWindow(hwnd, SW_HIDE);
		g_convertMarkersToTempoDialog = false;
	}

	else
	{
		// Detect timebase
		bool cancel = false;
		int timebase; GetConfig("itemtimelock", timebase);
		if (timebase)
		{
			int answer = MessageBox(g_hwndParent, __LOCALIZE("Project timebase is not set to time. Do you want to set it now?","sws_DLG_166"), __LOCALIZE("SWS - Warning","sws_mbox"), MB_YESNOCANCEL);
			if (answer == 6)
				SetConfig("itemtimelock", 0);
			if (answer == 2)
				cancel = true;
		}

		if (!cancel)
		{
			SetTimer(hwnd, 1, 100, NULL);
			ShowWindow(hwnd, SW_SHOW);
			SetFocus(hwnd);
			g_convertMarkersToTempoDialog = true;
		}
	}
	RefreshToolbar(SWSGetCommandID(ConvertMarkersToTempoDialog));
}
开发者ID:wolqws,项目名称:sws,代码行数:38,代码来源:BR_Tempo.cpp

示例10: SetConfig

void CapstoneTokenizer::UpdateConfig()
{
    SetConfig(ConfigBool("Disassembler", "Uppercase"),
              ConfigBool("Disassembler", "TabbedMnemonic"),
              ConfigBool("Disassembler", "ArgumentSpaces"),
              ConfigBool("Disassembler", "MemorySpaces"));
}
开发者ID:killbug2004,项目名称:xiew,代码行数:7,代码来源:capstone_gui.cpp

示例11: scfInit

void scfInit(BYTE delay) {
    BYTE i;
    
    //If delay = 0, return!
    if (delay == 0) return;

    //Clear Screen
    serPutRomString(AnsiEscClearScreen);

    /*
     * Wait a couple of seconds for user input.
	 * - If something is detected, start config.
	 * - If nothing detected, start main program.
     */
	serPutRomString(PressKeyForConfig);

	for (i = delay; i > 0; --i)	//Delay for 50mS x 60 = 3 sec
	{
		if ((i % 8) == 0) serPutByte('.');
		if (serIsGetReady())
		{
	        SetConfig();
			break;
		}
		DelayMs(50);
	}
	serPutByte('\r');
	serPutByte('\n');
}
开发者ID:grodansparadis,项目名称:vscp_firmware,代码行数:29,代码来源:sercfg.c

示例12: switch

/**
  Process synchronous 'control' requests
*/
TInt DZeroCopyLoopbackChannel::DoControl(TInt aFunction, TAny* a1, TAny* a2)
	{
	(void)a2;   // a2 not used in this example

	TInt r;

	switch (aFunction)
		{
		case RZeroCopyLoopbackDriver::EGetConfig:
			r = GetConfig((TDes8*)a1);
			break;

		case RZeroCopyLoopbackDriver::ESetConfig:
			r = SetConfig((const TDesC8*)a1);
			break;

		case RZeroCopyLoopbackDriver::ELoadPond:
			r = LoadPond((TPondTransferBuf*)a1);
			break;
		
		case RZeroCopyLoopbackDriver::EUnloadPond:
			r = UnloadPond();
			break;
		
		default:
			r = KErrNotSupported;
			break;
		}

	return r;
	}
开发者ID:cdaffara,项目名称:symbiandump-os1,代码行数:34,代码来源:ldd.cpp

示例13: SetConfig

bool
FlarmDevice::SetRange(unsigned range)
{
  StaticString<32> buffer;
  buffer.Format(_T("%d"), range);
  return SetConfig("RANGE", buffer);
}
开发者ID:pascaltempez,项目名称:xcsoar,代码行数:7,代码来源:Device.cpp

示例14: switch

TInt DExampleChannel::DoControl(TInt aFunction,TAny* a1,TAny* /*a2*/)
{
    TInt r = KErrNone;
    switch (aFunction)
    {
    case RPagingExample::ESetRealtimeState:
        iDynamicDfcQ->SetRealtimeState(a1 ? ERealtimeStateOn : ERealtimeStateWarn);
        break;

    case RPagingExample::EGetConfig:
        r = Kern::ThreadRawWrite(iClient, a1, (TAny*)&iConfig, sizeof(TConfigData), iClient);
        break;

    case RPagingExample::ESetConfig:
    {
        TConfigData newConfig;
        r = Kern::ThreadRawRead(iClient, a1, &newConfig, sizeof(TConfigData));
        if (r == KErrNone)
            SetConfig(newConfig);
    }
    break;

    default:
        r = KErrNotSupported;
    }
    return r;
}
开发者ID:kuailexs,项目名称:symbiandump-os1,代码行数:27,代码来源:d_pagingexample_1_pre.cpp

示例15: SetConfig

NPT_Result HttpConnector::start()
{
	if (m_started) {
		return NPT_ERROR_INVALID_STATE;
	}

	NPT_Result nr;

	Config cfg;
	cfg.m_ListenAddress     = m_ifAddr;
	cfg.m_ListenPort        = 0;
	cfg.m_IoTimeout         = NPT_HTTP_SERVER_DEFAULT_IO_TIMEOUT;
	cfg.m_ConnectionTimeout = NPT_HTTP_SERVER_DEFAULT_CONNECTION_TIMEOUT;
	nr = SetConfig(cfg);
	if (NPT_FAILED(nr)) {
		return nr;
	}

	m_abortFlag = false;
	nr = NPT_Thread::Start();
	if (NPT_FAILED(nr)) {
		return nr;
	}

	m_started = true;
	return NPT_SUCCESS;
}
开发者ID:bubbletreefrog,项目名称:DLNA,代码行数:27,代码来源:DJConnector.cpp


注:本文中的SetConfig函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。