Critical release v0.7.7.0

Finalspace
Hi everyone,

i have a important release for you all!

In the last couple of days i was working a bit on FPL, getting it more into a stable stage and fixed some important bugs. There was a critical bug that any allocated memory on win32 got never freed, which fortunatly was easiely be fixed by changing the flags from MEM_FREE to MEM_RELEASE (There is no MEM_FREE for VirtualFree!).

Also i added a few new functions and macros and moved the entrypoint definition into its own block, so you can now use FPL in /or as a static library. Oh and i added basic fullscreen support for X11 as well. In addition i changed all string buffer writing functions to return the pointer to the last written character instead - which is more useful than just returning the argumented target buffer.

One last thing: I added a another demo - A small physics based breakout game using Box2D, called "Crackout" - with random generated levels (If you change the initial seed to current time millis) ;)

One major note for you guys: This month may be very short on releases, due to the fact that i have a lot of RL things todo and i will be in vacation. So if you find some bugs or need something, just create a gibhub issue or write into the forums. Thanks!

The release is tagged, docs will be updated later this day.

Here is the full changelog:

## v0.7.7.0 beta:
- New: Added fplMutexTryLock()
- New: Added fplMakeDefaultSettings()
- New: Added fplStringAppend() / fplStringAppendLen()
- New: Added fplDebugBreak()
- Changed: Any string buffer writing functions returns the last written character now
- Changed: Changed fplGetClipboardAnsiText() to return bool instead of char *
- Changed: Changed fplGetClipboardWideText() to return bool instead of wchar_t *
- Changed: Entry point definition implementation is now a separated block and controlled by FPL_ENTRYPOINT
- Changed: MSVC compiler warnings are only disabled inside the implementation block
- Fixed: Never detected Win32 Path separator (Wrong define check)
- Fixed: MSVC compiler warnings was overwritten always, now uses push/pop
- Fixed: MSVC _Interlocked* functions has no signature for unsigned, so we use either LONG or LONG64

- New: [X11] Implemented fplIsWindowFullscreen
- New: [X11] Implemented basic fplSetWindowFullscreen
- Fixed: [POSIX] Create/Open*BinaryFile was wrong named
- Fixed: [Win32] fplMemoryFree actually never freed any memory

Comments

1
2
3
4
5
6
7
#	if __has_builtin(__builtin_debugtrap)
		//! Stop on a line in the debugger (Trap)
#		define fplDebugBreak() __builtin_debugtrap()
#	elif __has_builtin(__debugbreak)
		//! Stop on a line in the debugger (Break)
#		define fplDebugBreak() __debugbreak
#	endif

This looks wrong. How do I use it?
1
fplDebugBreak();

This will generate "__debugbreak" which is wrong.

1
fplDebugBreak()();

This will generate correct "__debugbreak()", but "__builtin_debugtrap()()"; will be wrong...


mmozeiko
1
2
3
4
5
6
7
#	if __has_builtin(__builtin_debugtrap)
		//! Stop on a line in the debugger (Trap)
#		define fplDebugBreak() __builtin_debugtrap()
#	elif __has_builtin(__debugbreak)
		//! Stop on a line in the debugger (Break)
#		define fplDebugBreak() __debugbreak
#	endif

This looks wrong. How do I use it?
1
fplDebugBreak();

This will generate "__debugbreak" which is wrong.

1
fplDebugBreak()();

This will generate correct "__debugbreak()", but "__builtin_debugtrap()()"; will be wrong...




Oh correct __debugbreak is a function, i somehow missed the braces. I fixed it in the develop branch.
So you normally use fplDebugBreak() just as a function.