Fixes a threading issue which caused QB64 to intermittently crash when using hardware commands
(Same threading fix yet to be applied to Linux)
Fixes problem in last update which prevented _OPENHOST/_OPENCLIENT from working (they always returned invalid handle '0')
Fixes 3D perspective issue when 3D rendering into images not the primary display (previuosly the dimensions of the screen/window not the target image were used to determine the aspect ratio)
(Can now generate stand-alone executables <1MB)
-g can be specified within code with:
$CONSOLE:ONLY
Note: Programs using this still need to call _DEST _CONSOLE or output will not be visible
Also added dependency rules to remove unrequired static system libs from being linked:
[X] lws2_32 as DEPENDENCY_SOCKETS
_OPENHOST
_OPENCLIENT
[X] -lwinspool as DEPENDENCY_PRINTER
LPRINT
_PRINTIMAGE
[X] -lwinmm & mmsystem.h
Required by:
FreeGlut (GUI)
Audio Out
[X] -lksguid (From the DirectX SDK, Required for Audio)
Required by:
Audio Out
[X] -ldxguid (From the DirectX SDK, Required for Audio)
Required by:
Audio Out
[X] -lole32
Required by:
Audio Out (dsound.c)
[X] -lgdi32
Required by:
void sub__icon(int32 handle_icon, int32 handle_window_icon, int32 passed){
int32 func__screenimage(int32 x1,int32 y1,int32 x2,int32 y2,int32 passed)
Printer
Some code has been moved from inside libqb.cpp into subfolder internal\c\libqb
Added dummy config.h file so libsamplerate could compile in Linux (Need to establish when it was removed)
This way, we only include that code if its commands are called upon.
In order to do this, some other areas had to be changed as well:
- There is now a libqb.h file, which declares some routines in libqb.cpp,
in order to allow them to be called from a separately compiled unit, i.e,
the user mods part.
- common.cpp now has an #include guard, just to be on the safe side.
- The library purge routines know about the new part.
- qb64.bas is modified to handle the new part; this area is just modeled
off the code for the other parts.
- Appropriate flags were set in the hash table entires for the commands.
- The user mods, now being a separate compilation unit, #include common.cpp
and libqb.h. The former is required for important type declarations and
access to glut commmands, the latter for access to libqb routines.
- qbx.cpp #includes the src.cpp file in the user mods part, which declares the
routines.
Something to ponder: libqb does not include or rely on any of the user mod routines,
so it's probably not necessary to rebuild it like with the other parts. That exploration
is for another day, however.