Example #1
0
void QtLayerWin32::SetWindow(HINSTANCE hInstance, HWND hWindow, int32 width, int32 height)
{
    CoreWin32Platform *core = dynamic_cast<CoreWin32Platform *>(CoreWin32Platform::Instance());
    if (NULL != core)
    {
        core->SetupWindow(hInstance, hWindow);
        RenderManager::Create(Core::RENDERER_OPENGL);
        RenderManager::Instance()->Create(hInstance, hWindow);

        FrameworkDidLaunched();

        Resize(width, height);
// 		DisplayMode currentMode = DisplayMode(width, height, 16, 0);
//
// 		KeyedArchive * options = Core::Instance()->GetOptions();
// 		if (options)
// 		{
// 			currentMode.bpp = options->GetInt32("bpp");
// 		}
//
// 		RenderManager::Instance()->ChangeDisplayMode(currentMode, false);
// 		RenderManager::Instance()->Init(currentMode.width, currentMode.height);
// 		UIControlSystem::Instance()->SetInputScreenAreaSize(currentMode.width, currentMode.height);
// 		Core::Instance()->SetPhysicalScreenSize(currentMode.width, currentMode.height);

        AppStarted();
    }
}
Example #2
0
void QtLayerWin32::SetWindow(HINSTANCE hInstance, HWND hWindow, int32 width, int32 height)
{
	CoreWin32Platform *core = dynamic_cast<CoreWin32Platform *>(CoreWin32Platform::Instance());
	if (NULL != core)
	{
		core->SetupWindow(hInstance, hWindow);
		RenderManager::Create(Core::RENDERER_OPENGL);		
		RenderManager::Instance()->Create(hInstance, hWindow);

		FrameworkDidLaunched();

		Resize(width, height);
		AppStarted();
	}
}
Example #3
0
void PlatformSpecificCore(const char **argv)
{
    int l_temppath;
    char temppath[MAX_PATH];
    l_temppath=GetTempPath(MAX_PATH,temppath);
    if(l_temppath>=MAX_PATH) _bprintf(error,BUFSIZE,"Path to temporary files is too long."); else {
     strcpy(argpart1,"RAIN=FILE ");
     strcpy(argpart2,",");
     if(!GetTempFileName(temppath,"raincmd",0,raincmdname)) _bprintf(error,BUFSIZE,"Unable to create temporary filename."); else {
      if(!GetTempFileName(temppath,"rainrep",0,rainrepname)) _bprintf(error,BUFSIZE,"Unable to create temporary filename."); else {
       rainout=fopen(rainrepname,"w+t");
       if (!rainout) _bprintf(error,BUFSIZE,"Unable to open rain reply file."); else {
        setbuf(rainout,NULL);
        fprintf(rainout,FULL "\n");
        if (remove(raincmdname)) _bprintf(error,BUFSIZE,"Unable to remove rain command file."); else {
         input[0]=0;
         if ( putenv(strcat(strcpy(argfull,argpart1),argpart2)) ) _bprintf(error,BUFSIZE,"Too small environment.\n"); else {

          if (!quiet)
          {
              printf("Resident Audio Interface installed.\n");
              installed=1;
          }
          if ( AppStarted(argv) )
          {
            while ( !endRain )
            {
              TalkPoll();
              Sleep(5); //max 15ms, longer sleep interrupts mp3 decoding
            }
            AppClose();
          }
          putenv("RAIN=");
         }
        }
        if(rainin) fclose(rainin);
       }
       fclose(rainout);
      }
      remove(rainrepname);
     }
     remove(raincmdname);
    }
}
Example #4
0
QtLayerWin32::QtLayerWin32()
{
    WidgetCreated();
    AppStarted();
}
Example #5
0
QtLayerMacOS::QtLayerMacOS()
{
    WidgetCreated();
    AppStarted();
}