Mikko Rasa [Tue, 17 Sep 2019 14:22:55 +0000 (17:22 +0300)]
Add a facility to automatically create backtraces for exceptions
Obtaining a backtrace in the catch block won't show where the exception
happened. Hooking into the exception handler internals is necessary.
Because this is somewhat disruptive to the language runtime, it is an
optional feature and disabled by default.
Mikko Rasa [Mon, 3 Jun 2019 11:50:39 +0000 (14:50 +0300)]
Fix formatted output operator detection in lexicalcast.h
Since it was using a default-constructed value as part of the test
expression, it would fail to detect the operator for classes that are
not default-constructable.
Mikko Rasa [Wed, 26 Dec 2018 22:38:04 +0000 (00:38 +0200)]
Add a main() function for Windows
Console applications (at least those compiled with MinGW) use it as the
entry point. MinGW has a support library to use WinMain as entry point,
but that requires a hack in builder that causes trouble with applications
that have a main() of their own.
Mikko Rasa [Wed, 12 Nov 2014 20:22:15 +0000 (22:22 +0200)]
Chdir into a sensible location before starting the application
System location accessors will ultimately return this directory. The
default is /, which can easily cause problems. In particular, many of
my applications expect to have their data in get_sys_data_dir()/"data".
On Android /data exists but is not readable.
Mikko Rasa [Mon, 10 Nov 2014 17:32:54 +0000 (19:32 +0200)]
Deprecate the system directory accessors that take arguments
They are fundamentally broken due to their dependence on cwd and $PATH,
which may be changed after application startup. Now that Application
stores an absolute argv0, the argument-less versions can provide a more
consistent answer.
Implementations for the functions are still the same, as they behave
correctly when an absolute argv0 is passed in. At some point in the
future I'll remove the old versions completely.
Mikko Rasa [Mon, 10 Nov 2014 17:29:11 +0000 (19:29 +0200)]
Store absolute path to argv[0] in Application
Working directory or $PATH may be changed by the program, so it may not
be possible to recover the executable later. It's still not completely
reliable since the parent process can pass any value for argv[0] through
execve().
Mikko Rasa [Mon, 10 Nov 2014 17:25:19 +0000 (19:25 +0200)]
Allow startup info to be set externally
... but only if startup didn't happen through Application::run(). Certain
facilities, like Graphics::Display on Windows, require startup info to be
set and would not work without this in a custom startup scenario.
Mikko Rasa [Sun, 19 Oct 2014 17:23:02 +0000 (20:23 +0300)]
Expose the asset manager from Android::MainThread
AFAICT the asset manager is tied to the application and not the activity,
so this simple approach should be safe even if the activity gets destroyed
and recreated due to orientation change or whatever.
Mikko Rasa [Sun, 19 Oct 2014 13:33:01 +0000 (16:33 +0300)]
Synchronize access to the underlying object of Slice
This was prompted by the interactions between GL::ResourceManager and
some upcoming changes to DataFile::PackSource. If a new Slice object is
created and tries to connect to signal_flush_required at the exact moment
another Slice is seeking and causing the signal to be emitted, the emit
and connect calls step on each others' toes and corrupt the heap.
Mikko Rasa [Sun, 12 Oct 2014 11:35:05 +0000 (14:35 +0300)]
Add window and input management signals for Android
The onCreate handler will now wait until either the main Application
object is constructed or the MainThread's resume_startup function is
called. This ensures that the application (or a library such as mspgui)
can connect to the signals before they are emitted.
Mikko Rasa [Sat, 11 Oct 2014 10:32:23 +0000 (13:32 +0300)]
Minimalistic port for Android
Application startup through NativeActivity is provided and uncaught
exceptions are logged. A number of things are still in need of proper
implementations.
Mikko Rasa [Sun, 5 Oct 2014 10:48:57 +0000 (13:48 +0300)]
Use direct constant values for non-POSIX baud rates
Not all systems (particularly older ones) have #defines for the extended
baud rates, and the standard doesn't provide anything to check their
existence either.