Comments (8)
Seems both of 'main' and 'monitor_sdl_refr_core' handled the he SDL events.
It should be solved here:
https://github.com/littlevgl/lv_drivers/blob/master/display/monitor.c#L299Have you updated lv_drivers?
It works, Thanks.
from lv_port_pc_eclipse.
+1
from lv_port_pc_eclipse.
In summary, when compiling on mac you need to:
-
#define USE_FBDEV 0 // THIS DISABLES USE OF LINUX FB
-
Add #ifdef macro around block in monitor.c file
like the following:
diff --git a/lv_drivers b/lv_drivers
--- a/lv_drivers
+++ b/lv_drivers
@@ -1 +1 @@
-Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f
+Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f-dirty
diff --git a/lv_drv_conf.h b/lv_drv_conf.h
index 9dce4bd..174b818 100644
--- a/lv_drv_conf.h
+++ b/lv_drv_conf.h
@@ -143,7 +143,7 @@
/*-----------------------------------------
* Linux frame buffer device (/dev/fbx)
*-----------------------------------------*/
-#define USE_FBDEV 1
+#define USE_FBDEV 0
#if USE_FBDEV != 0
#define FBDEV_PATH "/dev/fb0"
#endif
AND
--- a/lv_drivers
+++ b/lv_drivers
@@ -1 +1 @@
-Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f
+Subproject commit 1e10b91f92f427a7de2ba1a81fb8fec88d8b852f-dirty
diff --git a/lv_drv_conf.h b/lv_drv_conf.h
index 9dce4bd..174b818 100644
--- a/lv_drv_conf.h
+++ b/lv_drv_conf.h
@@ -143,7 +143,7 @@
/*-----------------------------------------
* Linux frame buffer device (/dev/fbx)
*-----------------------------------------*/
-#define USE_FBDEV 1
+#define USE_FBDEV 0
#if USE_FBDEV != 0
#define FBDEV_PATH "/dev/fb0"
#endif
[ghost@redux pc_simulator>find . -name monitor.c
./lv_drivers/display/monitor.c
[ghost@redux pc_simulator>cd lv_drivers/
[ghost@redux lv_drivers>git diff
diff --git a/display/monitor.c b/display/monitor.c
index 20d2b7e..46e67fd 100644
--- a/display/monitor.c
+++ b/display/monitor.c
@@ -296,7 +296,7 @@ static void monitor_sdl_refr_core(void)
SDL_RenderCopy(renderer, texture, NULL, NULL);
SDL_RenderPresent(renderer);
}
-
+#ifndef MONITOR_APPLE
SDL_Event event;
while(SDL_PollEvent(&event)) {
#if USE_MOUSE != 0
@@ -329,6 +329,7 @@ static void monitor_sdl_refr_core(void)
/*Sleep some time*/
SDL_Delay(SDL_REFR_PERIOD);
+#endif
}
#endif
SEE PR: #29
from lv_port_pc_eclipse.
Fixed, see : #12 (comment)
from lv_port_pc_eclipse.
Fixed, see : #12 (comment)
Thanks, this works. But failed to run the demo.
Please see the log below:
2018-10-29 17:20:23.728 demo[27003:4540970] *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'nextEventMatchingMask should only be called from the Main Thread!'
*** First throw call stack:
(
0 CoreFoundation 0x00007fff314742fb __exceptionPreprocess + 171
1 libobjc.A.dylib 0x00007fff57dffc76 objc_exception_throw + 48
2 AppKit 0x00007fff2f1a02cf -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 4167
3 libSDL2-2.0.0.dylib 0x00000001054201fb Cocoa_PumpEvents + 211
4 libSDL2-2.0.0.dylib 0x00000001053a4847 SDL_PumpEvents_REAL + 23
5 libSDL2-2.0.0.dylib 0x00000001053a48c2 SDL_WaitEventTimeout_REAL + 76
6 demo 0x00000001050bd35d monitor_sdl_refr_thread + 141
7 libSDL2-2.0.0.dylib 0x00000001053ce6d3 SDL_RunThread + 60
8 libSDL2-2.0.0.dylib 0x000000010542c668 RunThread + 9
9 libsystem_pthread.dylib 0x00007fff58c786c1 _pthread_body + 340
10 libsystem_pthread.dylib 0x00007fff58c7856d _pthread_body + 0
11 libsystem_pthread.dylib 0x00007fff58c77c5d thread_start + 13
)
libc++abi.dylib: terminating with uncaught exception of type NSException
Abort trap: 6
from lv_port_pc_eclipse.
Just to be sure. Now, the SDL events are NOT handled in monitor_sdl_refr_core()
but handled from the main()
like this.
What happes if you comment out the event handling?
from lv_port_pc_eclipse.
Just to be sure. Now, the SDL events are NOT handled in
monitor_sdl_refr_core()
but handled from themain()
like this.What happes if you comment out the event handling?
Seems both of 'main' and 'monitor_sdl_refr_core' handled the he SDL events.
from lv_port_pc_eclipse.
Seems both of 'main' and 'monitor_sdl_refr_core' handled the he SDL events.
It should be solved here:
https://github.com/littlevgl/lv_drivers/blob/master/display/monitor.c#L299
Have you updated lv_drivers?
from lv_port_pc_eclipse.
Related Issues (20)
- -lpng not found HOT 3
- table memory overflow HOT 2
- It works HOT 2
- build in windows using cygwin but no gui display HOT 7
- options missing in lv_conf.h HOT 2
- zip download does not include the drivers HOT 1
- MOUSE is not work on submodule lv_drivers v8.3.0 HOT 3
- Importing project to STMCubeIDE HOT 2
- Building the project in Ubuntu HOT 1
- ld: library not found for -lSDL2main HOT 4
- needs update to be able to run on new lvgl master HOT 6
- Recommends to update CMakeLists.txt file at top folder HOT 4
- unknown SDL_PixelFormatEnum HOT 5
- Release branches supported? HOT 2
- problemn building pc_simulator HOT 6
- Demo in `master` gets frozen
- Cmake build error HOT 4
- lv_port_pc_eclipse V9 build failure[windows] HOT 10
- lvgl master 2024.3.4 lvgl::thorvg compile error HOT 8
- Problem running this repository in windows HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lv_port_pc_eclipse.