summaryrefslogtreecommitdiff
path: root/src/settings.cpp
Commit message (Collapse)AuthorAge
* Fix issue Minetest crash when custom font path is not existMuhammad Rifqi Priyo Susanto2018-06-03
| | | | We try to use default fallback for both mono and main font when custom font path is not exist. This way, if Minetest is not corrupted, we could avoid crash.
* Some performance optimizations (#5424)Loïc Blot2017-03-22
| | | | | | | | | | | | | | | | | | | * Some performance optimizations This is globally removing some memory useless copy * use a const ref return on std::string Settings::get to prevent data copy on getters which doesn't need to copy it * pass some stack created strings to static const as they are not modified anywhere * Camera: return nametags per const ref instead of a list pointer, we only need to read it * INodeDefManager: getAll should be a result ref writer instead of a return copy * INodeDefManager: getAlias should return a const std::string ref * Minimap: unroll a Scolor creation in blitMinimapPixersToImageRadar to prvent many variable construct/destruct which are unneeded (we rewrite the content in the loop) * CNodeDefManager::updateAliases: prevent a idef getall copy * Profiler: constness * rollback_interface: create real_name later, and use const ref * MapBlockMesh updateFastFaceRow: unroll TileSpec next_tile, which has a cost of 1.8% CPU due to variable allocation/destruction, * MapBlockMesh updateFastFaceRow: copy next_tile to tile only if it's a different tilespec * MapBlockMesh updateFastFaceRow: use memcpy to copy next_lights to lights to do it in a single cpu operation
* Replace various std::map with UNORDERED_MAP + various cleanupsLoic Blot2016-10-05
| | | | | | | | | | | | This is part 2 for 5f084cd98d7b3326b51320455364337539710efd Other improvements: * Use the defined ItemGroupList when used * make Client::checkPrivilege const * inline some trivial functions * Add ActiveObjectMap typedef * Add SettingsEntries typedef
* Settings: Clean up settings changed callback codekwolekr2016-06-11
|
* Clean up StrfndShadowNinja2016-03-19
| | | | | | | | | | | Changes: * Fix indentation. * Pass strings by const reference. * Merge Strfnd and WStrfnd into one class instead of copying them. * Remove trailing spaces. * Fix variable names. * Move to util. * Other miscellaneous style fixes.
* Fix Settings::remove() always returning trueKahrl2016-01-19
|
* Change i++ to ++iDavid Jones2015-08-25
|
* Clean up threadingShadowNinja2015-08-23
| | | | | | | | | | | | | | | | | | | | * Rename everything. * Strip J prefix. * Change UpperCamelCase functions to lowerCamelCase. * Remove global (!) semaphore count mutex on OSX. * Remove semaphore count getter (unused, unsafe, depended on internal API functions on Windows, and used a hack on OSX). * Add `Atomic<type>`. * Make `Thread` handle thread names. * Add support for C++11 multi-threading. * Combine pthread and win32 sources. * Remove `ThreadStarted` (unused, unneeded). * Move some includes from the headers to the sources. * Move all of `Event` into its header (allows inlining with no new includes). * Make `Event` use `Semaphore` (except on Windows). * Move some porting functions into `Thread`. * Integrate logging with `Thread`. * Add threading test.
* Add mod securityShadowNinja2015-05-16
| | | | Due to compatibility concerns, this is temporarily disabled.
* Move globals from main.cpp to more sane locationsCraig Robbins2015-04-01
| | | | | | | | | | | | Move debug streams to log.cpp|h Move GUI-related globals to clientlauncher Move g_settings and g_settings_path to settings.cpp|h Move g_menuclouds to clouds.cpp|h Move g_profiler to profiler.cpp|h
* Fix game minetest.conf default settingsest312015-03-18
| | | | This was a regression introduced by f6e4c5d9cf459e8278a76a2beaee59732e841458 .
* For usages of assert() that are meant to persist in Release builds (when ↵Craig Robbins2015-03-07
| | | | NDEBUG is defined), replace those usages with persistent alternatives
* Settings fixes Make the GameGlobalShaderConstantSetter use the settings ↵gregorycu2015-01-25
| | | | callback (8% perf improvement in game loop) Ensure variable is set Ensure settings callback is threadsafe
* Revert "Make the GameGlobalShaderConstantSetter use the settings callback ↵Craig Robbins2015-01-25
| | | | | | (8% perf improvement in game loop)" This reverts commit a555e2d9b0ccee452996381a44677b8bec210036.
* Make the GameGlobalShaderConstantSetter use the settings callback (8% perf ↵gregorycu2015-01-23
| | | | | | improvement in game loop) Amend the settings callback to support userdata
* Settings: Fix invalid memory access when setting not found in working memkwolekr2014-12-12
|
* Settings: Fail on invalid sequence and throw exception for LuaSettingskwolekr2014-12-12
|
* Settings: Sanitize value for multiline terminator tokenskwolekr2014-12-11
|
* Add support for lacunarity in legacy NoiseParams string formatkwolekr2014-12-10
|
* Settings: Sanitize setting name everywhere, not just LuaSettingskwolekr2014-12-09
|
* Settings: Make setting entry group and values mutually exclusivekwolekr2014-12-09
| | | | | This greatly reduces the complexity of Settings code. Additionally, several memory leaks were fixed.
* Add flags and lacunarity as new noise parameterskwolekr2014-12-07
| | | | | | | Add 'absolute value' option to noise map functions Extend persistence modulation to 3D noise Extend 'eased' option to noise2d_perlin* functions Some noise.cpp formatting fixups
* Close settings files and save them correctlySmallJoker2014-12-06
|
* Settings: Various setting group fixes and enhancementskwolekr2014-12-04
| | | | | | | | - Remove blank setting values when setting has a group - Pair setting values with groups in file when possible - Preserve user-set whitespace in setting objects - Delete setting value when setting NoiseParams group - Delete overwritten groups outside of lock
* Settings: Fix getNoiseParamsFromValue()kwolekr2014-12-02
|
* Use setting groups for NoiseParamskwolekr2014-12-02
| | | | | | Add format example to minetest.conf.example Add Settings::setU16() Throw exception on attempted access of NULL settings groups
* Fix settings callback "call" lost on rebasesapier2014-12-01
|
* Fix buildCraig Robbins2014-12-01
| | | | Note: this does not fix the warnings generated by clang
* LuaSettings: Sanitize setting name stringskwolekr2014-11-30
|
* settings: Add setting groups and multiline entrieskwolekr2014-11-30
|
* Implement proper font handlingsapier2014-11-30
|
* Stop inserting empty lines at end of minetest.conf file each time it is ↵Craig Robbins2014-11-08
| | | | | | rewritten See: https://github.com/minetest/minetest/issues/1790
* Fix command line parsingKahrl2014-09-22
| | | | | | | Broken by 6bc4cad0eddd7a7cf593ca1471599e2d75727379, e.g. minetest --worldname world would be parsed as minetest --worldname --worldname
* Split settings into seperate source and header filesShadowNinja2014-09-21
This also cleans up settings a bit