mirror of
https://github.com/moonlight-stream/moonlight-qt.git
synced 2026-06-16 21:51:17 +00:00
Move clipboard processing to a separate thread to avoid blocking the main thread during pastes
This commit is contained in:
@@ -65,7 +65,7 @@ public:
|
||||
|
||||
void handleJoystickArrivalEvent(SDL_JoyDeviceEvent* event);
|
||||
|
||||
void sendText(const char* text);
|
||||
void sendText(QString& string);
|
||||
|
||||
void rumble(unsigned short controllerNumber, unsigned short lowFreqMotor, unsigned short highFreqMotor);
|
||||
|
||||
@@ -136,6 +136,9 @@ private:
|
||||
static
|
||||
Uint32 dragTimerCallback(Uint32 interval, void* param);
|
||||
|
||||
static
|
||||
int clipboardThreadProc(void *ptr);
|
||||
|
||||
SDL_Window* m_Window;
|
||||
bool m_MultiController;
|
||||
bool m_GamepadMouse;
|
||||
@@ -187,5 +190,11 @@ private:
|
||||
char m_DragButton;
|
||||
int m_NumFingersDown;
|
||||
|
||||
SDL_Thread* m_ClipboardThread;
|
||||
SDL_atomic_t m_ShutdownClipboardThread;
|
||||
QString m_ClipboardData;
|
||||
SDL_cond* m_ClipboardHasData;
|
||||
SDL_mutex* m_ClipboardLock;
|
||||
|
||||
static const int k_ButtonMap[];
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user