Commit 38d7a67d authored by daFischer's avatar daFischer
Browse files

Fixed a bug with the CursorMessage

parent aaa96476
...@@ -96,6 +96,8 @@ void Video::update(int zeit, Controls* controls) ...@@ -96,6 +96,8 @@ void Video::update(int zeit, Controls* controls)
break; break;
case CURSOR: case CURSOR:
SDL_Rect cm=CursorMessage::getMask(); SDL_Rect cm=CursorMessage::getMask();
cm.x=max(min((int)cm.x,(int)screen->w-cm.w),0);
cm.y=max(min((int)cm.y,(int)screen->h-cm.h),0);
if(CursorMessage::showCursor){ if(CursorMessage::showCursor){
// repair place on screen, where the cursor was // repair place on screen, where the cursor was
SDL_BlitSurface(rawScreen,&cm,screen,&cm); SDL_BlitSurface(rawScreen,&cm,screen,&cm);
...@@ -226,6 +228,7 @@ void Video::seekPosition(int position, Controls* controls){ ...@@ -226,6 +228,7 @@ void Video::seekPosition(int position, Controls* controls){
Annotation::mustRedraw=true; Annotation::mustRedraw=true;
Annotation::annotations.clear(); Annotation::annotations.clear();
//printf("IndexEntry at %d has%s Images\n",lastEntry, indexEntry->hasImages ? "" : " no");
if(lastEntry>=messages[firstRaw]->timestamp && indexEntry->hasImages) if(lastEntry>=messages[firstRaw]->timestamp && indexEntry->hasImages)
{ {
indexEntry->paintWaypoint(rawScreen); indexEntry->paintWaypoint(rawScreen);
......
build/Debug/GNU-Linux-x86/Messages/CursorPositionMessage.o: \
Messages/CursorPositionMessage.cpp Messages/CursorPositionMessage.h \
Messages/Message.h Messages/../Inflater.h Messages/../SizedArray.h \
Messages/../ProtocolPreferences.h Messages/../Constants.h \
Messages/CursorMessage.h Messages/../ColorConverter.h
Messages/CursorPositionMessage.h:
Messages/Message.h:
Messages/../Inflater.h:
Messages/../SizedArray.h:
Messages/../ProtocolPreferences.h:
Messages/../Constants.h:
Messages/CursorMessage.h:
Messages/../ColorConverter.h:
...@@ -4,7 +4,7 @@ CC=emcc -O2 -s ALLOW_MEMORY_GROWTH=1 ...@@ -4,7 +4,7 @@ CC=emcc -O2 -s ALLOW_MEMORY_GROWTH=1
DIR=../ DIR=../
MDIR=../Messages/ MDIR=../Messages/
MESSAGES= $(MDIR)Annotation.cpp $(MDIR)CursorMessage.cpp $(MDIR)DeleteAllAnnotation.cpp $(MDIR)DeleteAnnotation.cpp $(MDIR)EmptyMessage.cpp $(MDIR)HextileMessage.cpp $(MDIR)Message.cpp $(MDIR)RawMessage.cpp $(MDIR)RectangleAnnotation.cpp $(MDIR)WhiteboardMessage.cpp MESSAGES= $(MDIR)Annotation.cpp $(MDIR)CursorMessage.cpp $(MDIR)CursorPositionMessage.cpp $(MDIR)DeleteAllAnnotation.cpp $(MDIR)DeleteAnnotation.cpp $(MDIR)EmptyMessage.cpp $(MDIR)FreehandAnnotation.cpp $(MDIR)HextileMessage.cpp $(MDIR)LineAnnotation.cpp $(MDIR)Message.cpp $(MDIR)RawMessage.cpp $(MDIR)RectangleAnnotation.cpp $(MDIR)WhiteboardMessage.cpp
#ZSRC = libz/adler32.c libz/compress.c libz/crc32.c libz/deflate.c libz/gzclose.c libz/gzlib.c libz/gzread.c \ #ZSRC = libz/adler32.c libz/compress.c libz/crc32.c libz/deflate.c libz/gzclose.c libz/gzlib.c libz/gzread.c \
# libz/gzwrite.c libz/infback.c libz/inffast.c libz/inflate.c libz/inftrees.c libz/trees.c libz/uncompr.c libz/zutil.c # libz/gzwrite.c libz/infback.c libz/inffast.c libz/inflate.c libz/inftrees.c libz/trees.c libz/uncompr.c libz/zutil.c
SRC= $(DIR)AudioInterface.cpp $(DIR)AudioJS.cpp $(DIR)ColorConverter.cpp $(DIR)Constants.cpp $(DIR)Controls.cpp $(DIR)Index.cpp $(DIR)IndexEntry.cpp $(DIR)Inflater.cpp $(DIR)Player.cpp $(DIR)ProtocolPreferences.cpp $(DIR)SizedArray.cpp $(DIR)Video.cpp $(DIR)main.cpp $(MESSAGES) SRC= $(DIR)AudioInterface.cpp $(DIR)AudioJS.cpp $(DIR)ColorConverter.cpp $(DIR)Constants.cpp $(DIR)Controls.cpp $(DIR)Index.cpp $(DIR)IndexEntry.cpp $(DIR)Inflater.cpp $(DIR)Player.cpp $(DIR)ProtocolPreferences.cpp $(DIR)SizedArray.cpp $(DIR)Video.cpp $(DIR)main.cpp $(MESSAGES)
......
This diff is collapsed.
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment