浏览代码

update readme and add fullscreen toggle docs to sokol_app.h

Andre Weissflog 5 年之前
父节点
当前提交
04e93faf69
共有 2 个文件被更改,包括 13 次插入2 次删除
  1. 8 1
      README.md
  2. 5 1
      sokol_app.h

+ 8 - 1
README.md

@@ -6,7 +6,7 @@ Simple
 [STB-style](https://github.com/nothings/stb/blob/master/docs/stb_howto.txt)
 [STB-style](https://github.com/nothings/stb/blob/master/docs/stb_howto.txt)
 cross-platform libraries for C and C++, written in C.
 cross-platform libraries for C and C++, written in C.
 
 
-[See what's new](#updates) (**28-May-2020**: reference-based functions wrappers for C++)
+[See what's new](#updates) (**01-Jun-2020**: sapp_toggle_fullscreen() and sapp_is_fullscreen() functions)
 
 
 [Live Samples](https://floooh.github.io/sokol-html5/index.html) via WASM.
 [Live Samples](https://floooh.github.io/sokol-html5/index.html) via WASM.
 
 
@@ -459,6 +459,13 @@ Mainly some "missing features" for desktop apps:
 
 
 # Updates
 # Updates
 
 
+- **01-Jun-2020**: sokol_app.h now allows to toggle to and from fullscreen
+programmatically and to query the current fullscreen state via 2 new
+functions: ```sapp_toggle_fullscreen()``` and ```sapp_is_fullscreen()```.
+Currently this is only implemented for Windows and macOS (not Linux).
+Thanks for @mattiasljungstrom for getting the feature started and providing
+the Win32 implementation!
+
 - **28-May-2020**: a small quality-of-life improvement for C++ coders: when the
 - **28-May-2020**: a small quality-of-life improvement for C++ coders: when the
 sokol headers are included into C++, all public API functions which take a
 sokol headers are included into C++, all public API functions which take a
 pointer to a struct now have a C++ overload which instead takes a const-ref.
 pointer to a struct now have a C++ overload which instead takes a const-ref.

+ 5 - 1
sokol_app.h

@@ -518,6 +518,11 @@
     might still be used for the non-fullscreen window, in case the user can
     might still be used for the non-fullscreen window, in case the user can
     switch back from fullscreen- to windowed-mode).
     switch back from fullscreen- to windowed-mode).
 
 
+    To toggle fullscreen mode programmatically, call sapp_toggle_fullscreen().
+
+    To check if the application window is currently in fullscreen mode,
+    call sapp_is_fullscreen().
+
     ONSCREEN KEYBOARD
     ONSCREEN KEYBOARD
     =================
     =================
     On some platforms which don't provide a physical keyboard, sokol-app
     On some platforms which don't provide a physical keyboard, sokol-app
@@ -567,7 +572,6 @@
     - sapp_desc needs a bool whether to initialize depth-stencil surface
     - sapp_desc needs a bool whether to initialize depth-stencil surface
     - GL context initialization needs more control (at least what GL version to initialize)
     - GL context initialization needs more control (at least what GL version to initialize)
     - application icon
     - application icon
-    - mouse pointer visibility(?)
     - the UPDATE_CURSOR event currently behaves differently between Win32 and OSX
     - the UPDATE_CURSOR event currently behaves differently between Win32 and OSX
       (Win32 sends the event each frame when the mouse moves and is inside the window
       (Win32 sends the event each frame when the mouse moves and is inside the window
       client area, OSX sends it only once when the mouse enters the client area)
       client area, OSX sends it only once when the mouse enters the client area)