Compare commits

..

5 Commits
a4 ... a5

Author SHA1 Message Date
Michał Zając
b93aca796c Add issue template 2017-12-15 13:00:10 +11:00
Jack Karamanian
606da0ae47 Add borderless fullscreen option 2017-12-15 12:59:34 +11:00
Geoffrey McRae
d08fba9cf9 [host] fix cursor not visible on client reconnect 2017-12-15 12:56:39 +11:00
Geoffrey McRae
df13340439 [host] reset the update count when the guest flags a restart 2017-12-15 12:08:41 +11:00
Geoffrey McRae
b6c8136565 [client] initialize the local header copy for proper startup 2017-12-15 12:02:37 +11:00
4 changed files with 25 additions and 8 deletions

11
.github/issue_template.md vendored Normal file
View File

@@ -0,0 +1,11 @@
### Required information
Host CPU:
Host GPU:
Guest GPU:
Host Kernel version:
Host QEMU version:
Please describe what were you doing when the problem occured. If the Windows host application crashed please check for file named `looking-glass-host.dmp` and attach it to this bug report.
**Reports that do no include this information will be ignored and closed**

View File

@@ -67,6 +67,7 @@ struct AppParams
bool allowResize;
bool keepAspect;
bool borderless;
bool fullscreen;
bool center;
int x, y;
unsigned int w, h;
@@ -87,6 +88,7 @@ struct AppParams params =
.allowResize = true,
.keepAspect = true,
.borderless = false,
.fullscreen = false,
.center = true,
.x = 0,
.y = 0,
@@ -147,6 +149,8 @@ int renderThread(void * unused)
struct KVMFRHeader header;
volatile uint32_t * updateCount = &state.shm->updateCount;
memset(&header, 0, sizeof(struct KVMFRHeader));
while(state.running)
{
// poll until we have a new frame, or we time out
@@ -665,6 +669,7 @@ int run()
params.h,
(
SDL_WINDOW_SHOWN |
(params.fullscreen ? SDL_WINDOW_FULLSCREEN_DESKTOP : 0) |
(params.allowResize ? SDL_WINDOW_RESIZABLE : 0) |
(params.borderless ? SDL_WINDOW_BORDERLESS : 0) |
sdlFlags
@@ -889,7 +894,7 @@ void doLicense()
int main(int argc, char * argv[])
{
int c;
while((c = getopt(argc, argv, "hf:sc:p:jMmkanrdx:y:w:b:l")) != -1)
while((c = getopt(argc, argv, "hf:sc:p:jMmkanrdFx:y:w:b:l")) != -1)
switch(c)
{
case '?':
@@ -946,6 +951,10 @@ int main(int argc, char * argv[])
params.borderless = true;
break;
case 'F':
params.fullscreen = true;
break;
case 'x':
params.center = false;
params.x = atoi(optarg);

View File

@@ -44,7 +44,6 @@ Service::Service() :
m_frameIndex(0),
m_cursorDataSize(0),
m_cursorData(NULL),
m_haveShape(false),
m_shapePending(false)
{
m_ivshmem = IVSHMEM::Get();
@@ -134,7 +133,6 @@ void Service::DeInitialize()
m_timer = NULL;
}
m_haveShape = false;
m_shapePending = false;
if (m_cursorData)
@@ -183,6 +181,7 @@ bool Service::Process()
// check if the client has flagged a restart
if (f & KVMFR_HEADER_FLAG_RESTART)
{
m_header->updateCount = 0;
INTERLOCKED_AND8((volatile char *)flags, ~(KVMFR_HEADER_FLAG_RESTART));
restart = true;
break;
@@ -270,9 +269,9 @@ bool Service::Process()
if (frame.cursor.hasPos || (m_cursor.hasPos && restart))
{
if (!restart)
// remember the last state for client restart
if (frame.cursor.hasPos)
{
// remember the last state for client restart
m_cursor.hasPos = true;
m_cursor.visible = frame.cursor.visible;
m_cursor.x = frame.cursor.x;
@@ -290,7 +289,7 @@ bool Service::Process()
if (frame.cursor.hasShape || m_shapePending || (m_cursor.hasShape && restart))
{
if (!m_shapePending)
if (!m_shapePending && !restart)
{
if (frame.cursor.dataSize > m_frameSize)
{
@@ -314,7 +313,6 @@ bool Service::Process()
}
memcpy(m_cursorData, frame.cursor.shape, frame.cursor.dataSize);
m_haveShape = true;
}
// we can't send a frame with the cursor shape as we need the buffer location

View File

@@ -63,6 +63,5 @@ private:
CursorInfo m_cursor;
size_t m_cursorDataSize;
uint8_t * m_cursorData;
bool m_haveShape;
bool m_shapePending;
};