Commit Graph

36 Commits (528d7b1be146f04d6f2c414e6b932967e3a73e76)

Author SHA1 Message Date
Paxton Schweigert 54769ebdbf Remove tinythread from PluginManager
Remove useless tinythread import in PlugLoad-windows.cpp

Remove seemingly useless tinythread import in LuaTools.cpp

Factor out tinythread in LuaApi.cpp

Removed unused tinythread in LuaWrapper.cpp

Removed unused tinythread include in LuaTypes.cpp

Removed unused tinythread include in ColorText.cpp

Factor out tinythread in Console.h

Factor out tinythread in Console-posix.cpp

Factor out tinythread in Console-windows.cpp

Factor out tinythread in renderer_light

Factor out tinythread in DataDefs.cpp

Remove unused tinythread include in RemoteClient.cpp

Add includes for new mutex and conditional_variable usages in PluginManager

Factor out tinythread from devel/memview, renderermax/renderer_light, and rendermax/renderer_opengl plugins

Remove usages of tinythread in various CMakeLists.txt files, in .ycm_extra_conf.py, and delete tinythread itself

Delete tinythread from LISCENSE.rst

excise tinythread: fix deadlock in pluginmanager

excise tinythread: remove improper header

excise tinythread: fix double unlock. fix plugin typo
2023-12-27 19:23:58 -05:00
Myk Taylor ad5a0d41f5
only show the terminal if requested 2023-05-03 14:34:48 -07:00
Myk Taylor bebf3584ba
maybe fix terminal in foreground issue 2023-05-03 14:15:36 -07:00
lethosor fe0cd9a939
Make lineedit() fail sooner when another lineedit() call is active
Before, calling `dfhack.run_command('tiletypes')` from a `dfhack.timeout` callback would leave the console in a broken state, since raw mode was enabled but never disabled.

Only tested on Linux with a supported terminal.
2020-12-03 22:04:00 -05:00
Pauli dec61b89be Fix windows ReadConsoleInput return value check
I messed up the check. I forgot that windows commonly has opposite
return values to posix and failed to check it from documentation.

Fixes 1345
2018-07-08 00:50:43 +03:00
Pauli d1a3f1a738 Allow canceling lineedit with ctrl+c 2018-07-04 15:21:25 +03:00
Pauli 1acb60daa2 Prevent data races during console/init thread shutdown
There is a minor chance that console or init thread would access already
freed memory when core is shutting down and cleaning up state. To avoid
any danger of having random bugs caused by the potential data race I
decided to make sure the shutdown code waits for the thread to exit
first.

Windows change is completely untested. It is purely based on msdn
documentation.
2018-06-22 17:57:37 +03:00
PatrikLundell d6a51f65eb Blocked errant line feed at full buffer 2017-12-22 13:42:59 +01:00
PatrikLundell 14996a9d67 Made prompt respect color reset 2017-12-14 12:46:52 +01:00
PatrikLundell cf7dbd478a Made prompt respect color reset 2017-12-14 12:45:35 +01:00
Kelly Kinkade 0b26e9aec7 Fix a couple of MSVC warnings
Use intptr_t instead of long for a handle, and add an explict cast to
eliminate a narrowing conversion warning
2017-08-07 14:13:22 -05:00
lethosor 15d3b7831f hide/show: Provide feedback on unsupported platforms 2015-02-08 09:30:40 -05:00
Warmist dedd7e4185 Adds new console methods and commands to hide/show console. Only on windows (for now?) 2014-05-26 18:42:04 +03:00
Alexander Gavrilov fd0bf2ef92 Extract the color enum from color_ostream to toplevel. 2012-08-19 09:21:25 +04:00
Petr Mrázek d825356878 Fix windows console bug
Line input cursor was going crazy when input reached right side of the screen
2012-04-17 23:23:45 +02:00
Quietust 6656852fff win32 SetConsoleTextAttribute doesn't know what COLOR_RESET (-1) is 2012-03-27 13:22:45 -05:00
Alexander Gavrilov 8cc82d5876 Make plugins accept explicit output stream references.
This is an incompatible change to the plugin ABI.

The Console is not thread-safe unless used indirectly
via color_ostream_proxy, so everything should use their
per-thread stream.
2012-03-10 15:55:42 +04:00
Alexander Gavrilov b2737e2bed Pull out a colored text output interface out of the Console class. 2012-03-10 13:29:33 +04:00
Petr Mrázek 9db20bd84d Header changes/cleanup. 2011-12-31 12:48:42 +01:00
Petr Mrázek af46b262b5 More init hardening. 2011-11-04 09:08:29 +01:00
Petr Mrázek 81e6bce92c Command history separated from Console. 2011-08-13 14:42:09 +02:00
Petr Mrázek b0659224fa Fix windows build. 2011-08-01 06:30:29 +02:00
Petr Mrázek 2a95a4edf2 Windows part of mutex rewrite. 2011-07-27 14:22:37 +02:00
Petr Mrázek fdb5397a1d Safer console shutdown. 2011-07-17 11:06:45 +02:00
Petr Mrázek 003ad63c56 Disabled ctrl+c on windows (null signal handler). Some small fixes. 2011-07-16 08:00:13 +02:00
Petr Mrázek 9eea07fb66 The console is now awesome when you use C++ streams too. 2011-07-16 00:15:20 +02:00
Petr Mrázek b85f196dc4 The console is now awesome on Windows too. 2011-07-15 19:58:17 +02:00
Petr Mrázek d21b196766 Error printing call for Console, the NYAN CAT! 2011-07-14 11:15:23 +02:00
Petr Mrázek f2b46274ec Fix for a bug in command history queue access. dfhack script can run valgrind. 2011-07-14 08:02:29 +02:00
Petr Mrázek 792d272fbf Windows side of the Console rewrite 2011-07-14 04:05:27 +02:00
Petr Mrázek 722531f590 Added destructor code for PluginManager, console color reset funstion. 2011-06-25 08:05:17 +02:00
Petr Mrázek 6fd7d42f00 Plugin manager, reworked kittens and reveal. 2011-06-25 05:35:29 +02:00
Petr Mrázek 0bb097296a Prospector prints text again. Plugin lookup is better (ignores more non-library files) 2011-06-24 02:48:56 +02:00
Petr Mrázek 857decbcce Plugins go into a folder, disabled console close button on windows because of bugs. 2011-06-22 18:04:22 +02:00
Petr Mrázek 8f27966540 Console revamp - windows part 2011-06-22 14:25:39 +02:00
Petr Mrázek f8cdd95b09 Console revamp - linux part. 2011-06-22 08:14:21 +02:00