When it was checking for the BOM at the beginning of the file, it would
just return out of the function if it didn't read at least 3 bytes.
This would particularly affect text sources.
This reverts commit 7224e8d36e6c635c9769af1a5f1d9f7c903ac9e0.
This change was unnecessary due to the fact that indexing is already
performed automatically via the cast operator.
Outputting a human-readable error message on library load failure makes
it a little bit easier for plugin developers to determine why a plugin
library may have failed to load (such as missing dependency), rather
than having to look up the error code each time.
Closesjp9000/obs-studio#596
Adds a function to the C-family parser to go to the next token and
create a string copy of it. Useful for when you want to get a copy of
the next token regardless of what type it is.
When the #include directive in in the C lexer preprocessor is
encountered, the files being included need to be relative to the
directory of the file that the include was used in.
SetThreadExecutionState with ES_DISPLAY_REQUIRED has the same effect of preventing the screensaver from activating. Using SPI_SETSCREENSAVEACTIVE leaves the screensaver disabled system-wide if OBS crashes before it can re-enable it.
Use explicit UTF-8 byte sequence for the "no-break space" character.
Prevents issues with certain editors, and fixes the following compiler
warning on Visual C++:
warning C4819: The file contains a character that cannot be represented
in the current code page (X). Save the file in Unicode format to prevent
data loss
Using gzdopen will not work properly if the C standard library used to
get the descriptor is not the same library as the one that was compiled
with zlib. When this is the case, it causes zlib to fail to write a
file, and would report a C standard library error. Use gzopen and
gzopen_w instead to ensure that the file is opened and closed by zlib
itself, ensuring that zlib and the libobs do not have to share the C
standard library between each other.
These fucntions prevent the computer from going to sleep, hibernating,
or starting up a screen saver.
On linux, it will also attempt to use DBus to prevent gnome/kde/etc
sleep, but it's not necessarily required in order to compile the
library. Otherwise, it will simply call "xdg-screensaver reset" once
every 30 seconds to reset the screensaver timer.
This was broken in cd222f8ce03a65815ef6474cce89f069c1d49f8c which had a
horrible commit message that makes replicating the issue impossible if
there weren't others who reported similar visual studio issues when
using a Japanese locale