LibCore: Port EventLoop to Windows

This commit is contained in:
stasoid 2024-10-31 12:44:19 +05:00 committed by Andrew Kaster
commit 1c77135948
Notes: github-actions[bot] 2024-11-14 18:19:34 +00:00
7 changed files with 320 additions and 6 deletions

View file

@ -7,8 +7,12 @@
#include <AK/NonnullOwnPtr.h>
#include <LibCore/Event.h>
#include <LibCore/EventLoopImplementation.h>
#include <LibCore/EventLoopImplementationUnix.h>
#include <LibCore/ThreadEventQueue.h>
#ifdef AK_OS_WINDOWS
# include <LibCore/EventLoopImplementationWindows.h>
#else
# include <LibCore/EventLoopImplementationUnix.h>
#endif
namespace Core {
@ -23,7 +27,7 @@ static EventLoopManager* s_event_loop_manager;
EventLoopManager& EventLoopManager::the()
{
if (!s_event_loop_manager)
s_event_loop_manager = new EventLoopManagerUnix;
s_event_loop_manager = new EventLoopManagerPlatform;
return *s_event_loop_manager;
}