summaryrefslogtreecommitdiffhomepage
path: root/src/core.c
AgeCommit message (Collapse)Author
2020-06-27Minor format tweakRay
2020-06-24[add] GetMonitorRefreshRate(int monitor); (#1289)Shylie
2020-06-23REVIEWED: ToggleFullscreen(), issue #1287Ray
2020-06-15WARNING: BIG CHANGE: Move Color functions to texture moduleraysan5
WARNING: Some functions ADDED and some RENAMED: - RENAMED: Fade() -> ColorAlpha() [Added #define for compatibility] - ADDED: ColorAlphaBlend() - ADDED: GetPixelColor() - ADDED: SetPixelColor()
2020-06-08Fix wrong height used when using scissor mode with render texture of ↵Chang Si Yuan
different height from window (#1272)
2020-06-07Remove warning from GetDirectoryPath()raysan5
2020-06-02Use TRACELOG() macro instead of TraceLog() functionraysan5
2020-05-26Added bool IsCursorOnScreen(void). (#1262)ChrisDill
- The Mouse struct already stores cursorOnScreen. This function simply exposes it to the usage code.
2020-05-23Review usage of sizeof(), unify conventionsraysan5
All functions requiring sizeof() now follow the same convention: NUM_ELEMENTS*NUM_SUBELEMENTS*sizeof()
2020-05-14Review formatting GetPRevDirectoryPath()raysan5
2020-05-14Emscripten fullscreen -WIP-raysan5
2020-05-14fix bug in GetPrevDirectoryPath on Unix-like systems (#1246)ivn
2020-05-09Misc code reviewsraysan5
2020-05-09Gamepad axis bug fixes and improvement (#1228)Mickaël Malécot
* Fix gamepad axis count * Fix Xbox axis drawing * Ignore low axis values * Revert "Fix gamepad axis count" This reverts commit f08ae4bf * Fix GamepadAxis API * Fix conflict with master * Revert Gamepad MAX definitions * Revert MAX_GAMEPAD_AXIS update
2020-05-06Avoid all MSVC compile warningsraysan5
Most warning were related to types conversion (casting required) and unsigned/signed types comparisons. Added preprocessor directives (_CRT_SECURE_NO_DEPRECATE; _CRT_NONSTDC_NO_DEPRECATE) to avoid warnings about unsafe functions, those functions are safe while used properly and recommended alternatives are MS only. Some external libraries still generate warnings.
2020-05-06Replace deprectared usleep() callsraysan5
2020-05-01Review exposed #defines and allow user re-definingraysan5
There are multiple #define values around raylib, usually not exposed for redefinition, just reviewed all of them to allow users redefining them on compile time if required. Also, multiple #define have been renamed and commented.
2020-04-30Reviewed UWP updateraysan5
Mostly code formatting tweaks
2020-04-30Remove strcmp() requirementraysan5
2020-04-30UWP rework (#1231)Reece Mackie
* First draft of UWP rework. * Read desc - Moved UWP specific functions to uwp_events.h - Removed BaseApp. - Implemented example UWP lifecycle. * Added GIF recording and screenshot support. * Character inputs and filesystem stuff * Fix game closing on Xbox when B is pressed. * Fix the gamepad binding hack * Add as many keys as I believe are possible. * Implemented mouse locking of a sort. * Remove rogue todo, the rest are for a game dev using this example. * Implemented touch how I "think" it should work. I cant test this. * Review.
2020-04-29Init CORE.Window.focusedraysan5
2020-04-27ADDED: IsWindowFocused()raysan5
2020-04-26Corrected issue #1203raysan5
2020-04-24ADDED: GetWindowScaleDPI()raysan5
2020-04-16Remove commentraysan5
2020-04-13Review UWP project -WIP-raysan5
2020-04-09Review display size init for RPIraysan5
2020-04-05Some code tweaks, comments and definesraysan5
2020-03-30Review formating and signegness issuesraysan5
2020-03-30[cppcheck] Improvements in SaveStorageValue() in core.c (#1160)Dani Martin
* [cppcheck] Improvements in SaveStorageValue() in core.c in file core.c cppcheck shows errors only in function SaveStorageValue(): * Common realloc mistake: 'fileData' nulled but not freed upon failure * Memory pointed to by 'fileData' is freed twice. Validation: * Tested examples/core/core_storage_values.c * Launched Unit Test for this function * Rerun CPPCHECK afer fix * [cppcheck] Change functions header to accept only positive position in files Changes: * Functions SaveStorageValue(), LoadStorageValue() (core.c) * Functions LoadFileData(), SaveFileData() (utils.c) * Headers in raylib.h Validation: * Tested examples/core/core_storage_values.c * Launched Unit Test for these functions * Rerun CPPCHECK afer fix
2020-03-27Review TRACELOG() messagesraysan5
2020-03-27[core] Review TRACELOG() messages, categorizedraysan5
2020-03-25Remove trail spacesraysan5
2020-03-25Minor tweaksraysan5
2020-03-25ADDED: IsWindowFullscreen()raysan5
2020-03-24Remove define not requiredraysan5
2020-03-24Android: Better track touch input returned from IsMouse*() (#1144)Doyle
* Android: Better track touch input returned from IsMouse*() Switch to actually tracking touch input to use for "mouse" input rather than the gestures system. The gesture system as an abstraction ontop of raw touch input loses some information needed to map to "mouse" input. Before, - IsMouseButtonReleased() triggers immediately after the initial touch (because GESTURE_TAP activates immediately on touch) instead of waiting for the touch to be released. - IsMouseButtonUp() returns false, when it should just be the opposite of IsMouseButtonDown(). - IsMouseButtonDown() returns true only after GESTURE_HOLD (which activates after some period of time after GESTURE_TAP), when instead it should just be true whenever there is touch input i.e. gesture != GESTURE_NONE or alternatively when any input is received on the screen. After this PR, touches map closer to mouse input. - IsMouseButtonReleased() triggers when touch is released (last frame was touched, this frame not touched). - IsMouseButtonUp() returns the opposite of IsMouseButtonDown() - IsMouseButtonDown() is true when (AMOTION_EVENT_ACTION_DOWN || AMOTION_EVENT_ACTION_MOVE) and false when (AMOTION_EVENT_ACTION_UP) * RPI: Include index check for RPI in GetTouchPosition()
2020-03-23Comment tweaksraysan5
2020-03-19Android: Track touch motion across screen (#1137)Doyle
This was working in 2.6 but no longer does in current git tree. It appears touch position is only tracked on AMOTION_EVENT_ACTION_[DOWN|UP], which only registers the initial touch on the screen. Subsequent movement is not tracked into CORE. Touch position and the Gesture System appears to be updated twice in AndroidInputCallback in what looks like perhaps a copy paste error (code is identical) with the exception of tracking AMOTION_EVENT_ACTION_UP in the 2nd copy of the code (but this is not necessary to track). If you need to track the first touch or release touch position, you can do so with checking IsMouseButton[Pressed|Released] on the same frame. This patch makes it so the touch position is always updated, and merges the duplicated code into 1 singular code path.
2020-03-17Replace external libraries custom allocators by raylib ones #1074raysan5
NOTE: Two libraries still use custom allocators: glfw and stb_vorbis
2020-03-15Android: Set display.[width, height] before screen size check (#1132)Doyle
In `InitGraphicsDevice(...)`, the Android section has a screen security check like other platforms- but CORE.display.width, CORE.display.height are not set yet, so the security check sets it to 0. So ensure we query the device's screen width and height before the screen size security check. This also gives you the ability to run a proper full-screen application on Android without any scaling and guess work on the target device by setting screen width and height to 0 in `InitWindow(...)` and using `GetScreen[Width|Height]()` to get the actual values.
2020-03-12Added note on transparent framebuffer w/o X11 on RPIRay
2020-03-09Minor tweaksRay
2020-03-09Address issue #1125Ray
2020-03-07Reviewed missing includeRay
2020-03-05Android: Support file saving to internal data storageRay
2020-03-03WARNING: Corrected issue with IsKeyDown() #1119Ray
2020-03-03Update core.cRay
2020-03-03REVIEWED: Mouse/Touch input systemRay
After several reviews, now it seems everything works as expected.
2020-03-02Support any mouse button for gesture detectionRay