mirror of
https://github.com/niellun/FastCarPlay.git
synced 2026-09-23 02:10:42 +02:00
Early interface draw
This commit is contained in:
+3
-4
@@ -246,15 +246,14 @@ void application()
|
|||||||
p.fullscreen = Settings::fullscreen;
|
p.fullscreen = Settings::fullscreen;
|
||||||
p.mouseDown = false;
|
p.mouseDown = false;
|
||||||
|
|
||||||
|
Interface interface(renderer);
|
||||||
if (p.fullscreen)
|
if (p.fullscreen)
|
||||||
{
|
{
|
||||||
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);
|
SDL_SetWindowFullscreen(window, SDL_WINDOW_FULLSCREEN);
|
||||||
SDL_SetWindowBordered(window, SDL_FALSE);
|
SDL_SetWindowBordered(window, SDL_FALSE);
|
||||||
}
|
}
|
||||||
SDL_ShowWindow(window);
|
SDL_ShowWindow(window);
|
||||||
SDL_SetRenderDrawColor(renderer, 0, 0, 0, 255); // Set draw color to black
|
interface.drawHome(true, 0);
|
||||||
SDL_RenderClear(renderer); // Clear renderer to black
|
|
||||||
SDL_RenderPresent(renderer); // Present initial blank frame
|
|
||||||
|
|
||||||
VideoBuffer videoBuffer;
|
VideoBuffer videoBuffer;
|
||||||
Protocol protocol(Settings::width, Settings::height, Settings::sourceFps, AV_INPUT_BUFFER_PADDING_SIZE);
|
Protocol protocol(Settings::width, Settings::height, Settings::sourceFps, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||||
@@ -264,7 +263,7 @@ void application()
|
|||||||
audioMain.start(&protocol.audioStreamMain);
|
audioMain.start(&protocol.audioStreamMain);
|
||||||
audioAux.start(&protocol.audioStreamAux, &audioMain);
|
audioAux.start(&protocol.audioStreamAux, &audioMain);
|
||||||
protocol.start(evtStatus, evtConnected);
|
protocol.start(evtStatus, evtConnected);
|
||||||
Interface interface(renderer);
|
|
||||||
PipeListener pipeListener(protocol, (Settings::keyPipe.value.length() > 2) ? Settings::keyPipe.value.c_str() : nullptr);
|
PipeListener pipeListener(protocol, (Settings::keyPipe.value.length() > 2) ? Settings::keyPipe.value.c_str() : nullptr);
|
||||||
|
|
||||||
std::cout << "[Main] Loop" << std::endl;
|
std::cout << "[Main] Loop" << std::endl;
|
||||||
|
|||||||
Reference in New Issue
Block a user