mirror of
https://github.com/gnif/LookingGlass.git
synced 2025-10-13 10:58:09 +00:00
[c-host] revert locking series, this needs more thought
Revert "[c-host] make pointer post function thread safe" This reverts commit3feed7ba07
. Revert "[c-hots] fix incorrect unlock timing" This reverts commit57f1f2d1fe
. Revert "[c-host] increase the queue length and remove debug output" This reverts commitb0f9f15a60
. Revert "[c-host] dxgi: use low level mouse input by default" This reverts commitdc4d820666
. Revert "[c-host] nvfbc: no need for a cursor position event with LGMP" This reverts commite30b54ddb2
.
This commit is contained in:
@@ -41,7 +41,7 @@ Place, Suite 330, Boston, MA 02111-1307 USA
|
||||
#define ALIGN_UP(x) ALIGN_DN(x + 0x7F)
|
||||
|
||||
#define LGMP_Q_FRAME_LEN 2
|
||||
#define LGMP_Q_POINTER_LEN 40
|
||||
#define LGMP_Q_POINTER_LEN 20
|
||||
|
||||
static const struct LGMPQueueConfig FRAME_QUEUE_CONFIG =
|
||||
{
|
||||
@@ -63,7 +63,6 @@ struct app
|
||||
{
|
||||
PLGMPHost lgmp;
|
||||
|
||||
LG_Lock pointerPostLock;
|
||||
PLGMPHostQueue pointerQueue;
|
||||
PLGMPMemory pointerMemory[LGMP_Q_POINTER_LEN];
|
||||
PLGMPMemory pointerShape;
|
||||
@@ -289,6 +288,7 @@ bool captureGetPointerBuffer(void ** data, uint32_t * size)
|
||||
// spin until there is room
|
||||
while(lgmpHostQueuePending(app.pointerQueue) == LGMP_Q_POINTER_LEN)
|
||||
{
|
||||
DEBUG_INFO("pending");
|
||||
if (!app.running)
|
||||
return false;
|
||||
}
|
||||
@@ -301,8 +301,6 @@ bool captureGetPointerBuffer(void ** data, uint32_t * size)
|
||||
|
||||
void capturePostPointerBuffer(CapturePointer pointer)
|
||||
{
|
||||
LG_LOCK(app.pointerPostLock);
|
||||
|
||||
PLGMPMemory mem;
|
||||
const bool newClient = lgmpHostQueueNewSubs(app.pointerQueue) > 0;
|
||||
|
||||
@@ -353,7 +351,6 @@ void capturePostPointerBuffer(CapturePointer pointer)
|
||||
|
||||
default:
|
||||
DEBUG_ERROR("Invalid pointer type");
|
||||
LG_UNLOCK(app.pointerPostLock);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -363,8 +360,6 @@ void capturePostPointerBuffer(CapturePointer pointer)
|
||||
if ((pointer.shapeUpdate || newClient) && app.pointerShapeValid)
|
||||
flags |= CURSOR_FLAG_SHAPE;
|
||||
|
||||
LG_UNLOCK(app.pointerPostLock);
|
||||
|
||||
LGMP_STATUS status;
|
||||
while ((status = lgmpHostQueuePost(app.pointerQueue, flags, mem)) != LGMP_OK)
|
||||
{
|
||||
@@ -422,8 +417,6 @@ int app_main(int argc, char * argv[])
|
||||
return -1;
|
||||
}
|
||||
|
||||
LG_LOCK_INIT(app.pointerPostLock);
|
||||
|
||||
int exitcode = 0;
|
||||
DEBUG_INFO("IVSHMEM Size : %u MiB", shmDev.size / 1048576);
|
||||
DEBUG_INFO("IVSHMEM Address : 0x%" PRIXPTR, (uintptr_t)shmDev.mem);
|
||||
@@ -562,7 +555,6 @@ fail:
|
||||
lgmpHostFree(&app.lgmp);
|
||||
|
||||
ivshmemClose(&shmDev);
|
||||
LG_LOCK_FREE(app.pointerPostLock);
|
||||
return exitcode;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user