Commit Graph

615 Commits

Author SHA1 Message Date
8ff2b387f9 Review code formating 2020-11-15 13:17:11 +01:00
bd287efa4c Fixed zero-window upscaling (#1428)
There is no zero-check, so window upscales to nothing.
SetupFramebuffer() is kinda wrong, it uses not its params, but global variables. I won't touch it, maybe it has purpose
2020-11-15 13:13:21 +01:00
Ray
3e1cd487df Remove trailing spaces 2020-11-03 23:47:33 +01:00
f46514b855 Fixed keyboard stuttering but for cmake only (#1422)
* fixed mouse movements are bound to the screen resolution (https://github.com/raysan5/raylib/issues/1392)

* fixed keyboard stuttering on PLATFORM_RPI and PLATFORM_DRM (https://github.com/raysan5/raylib/issues/1392)

* fixed keyboard stuttering on PLATFORM_RPI and PLATFORM_DRM (https://github.com/raysan5/raylib/issues/1392)
2020-11-03 23:39:56 +01:00
Ray
5ac9cb04c2 Reverted ChangeDirectory() redesign
It returns true on success again
2020-11-01 19:06:21 +01:00
Ray
01d9af12f7 REDESIGNED: ChangeDirectory()
Not returning error code (or success), just log if it fails
2020-11-01 18:14:55 +01:00
Ray
60d874caf8 REVIEWED: GetWindowScaleDPI() #1086 2020-10-29 19:29:59 +01:00
482b8a5e7e Some tweaks 2020-10-24 10:37:15 +02:00
Ray
f12db180cd Reviewed PR #1407 2020-10-21 11:08:37 +02:00
9833fe45eb Added desktop cursor getter and setter functions (#1407)
* [core] Added desktop cursor getter and setter functions

* Example: Set mouse cursor in text input box

* Setup standard cursors _after_ GLFW window initialization

* Remove old `int GetMouseWheelMove` declaration
2020-10-21 10:55:52 +02:00
3c9f7263e5 fixed mouse movements are bound to the screen resolution (https://github.com/raysan5/raylib/issues/1392) (#1410) 2020-10-13 22:26:40 +02:00
Ray
41192c6d4a Replace 0.f by 0.0f 2020-10-05 20:19:18 +02:00
b29311c7ca mouse: Return float movement for precise scrolling where possible (#1397) 2020-10-05 20:16:23 +02:00
e90b4d8915 Platform DRM (#1388)
* updated README.md

* fixed CMakeLists.txt to allow building and debugging with Visual Studio Code and CMAKE Tools extension

* added PLATFORM_DRM
contains mouse pointer code from https://github.com/chriscamacho

* removed redundant cleanup in InitGraphicsDevice

* fixed DRM connector mode selection

* added choosen DRM connected mode to log output

* added respecting TargetFPS on DRM mode selection, default to 60

* added support for GetMonitorRefreshRate

* changed SUPPORT_MOUSE_CURSOR_RPI to SUPPORT_MOUSE_CURSOR_NATIVE

* changed avoidProgressive to allowInterlaced

* cleanup, function extraction and improved mode selection

* README reverted to original for PR

* line endings fixed for core.c

* removed old code

* mouse pointer reverted to small square

* replaced SetGraphicDeviceName() by DEFAULT_GRAPHIC_DEVICE_DRM

Co-authored-by: kernelkinetic <kernelkinetic@outlook.com>
2020-09-27 10:18:43 +02:00
6038c8fdd5 fixed wrong error message for input device on RPI (#1379)
* fixed wrong error message for input device

* error message without errnofor input device on RPI
 to prevent from including additional header

Co-authored-by: kkl <klingenberger@bfmc.de>
2020-09-18 08:52:52 +02:00
cdc8850e68 WARNING: REDESIGN of rlgl framebuffers API #721
This redesign allows more flexibility when creating RenderTexture and a simplification (and hopefully removal) of `GenTexture*()` functions, that should not belong to this model but the user code, due to the use of custom shaders.

Also, this new API opens the door for a possible GBuffers type and advance rendering possibilities...

Some functions of the API have been also simplified or even removed.

rlgl module can be used as an standalone library, so, a version for the library has been added: v3.1.0, matching current raylib version.
2020-09-18 02:11:49 +02:00
11fbd49b73 Avoid GETCWD() warning #1371 2020-09-16 11:44:48 +02:00
Ray
cb8cbb038b WARNING: RENAMED: GetExtension() to GetFileExtension() 2020-09-13 14:07:08 +02:00
85d5744679 REVIEW: glfwSetWindowMaximizeCallback() not available on web 2020-09-07 15:34:21 +02:00
05cdaf7d01 MOVED: rlUnproject() [rlgl] -> Vector3Unproject() [raymath] 2020-09-01 21:08:45 +02:00
dcbe481a28 adding new windows functions (#1357) 2020-09-01 20:29:13 +02:00
c32ae480af RENAMED: FormatText() -> TextFormat()
This function was renamed for consistency in raylib 3.0, just unified all examples to use TextFormat() instead of FormatText()
2020-08-16 11:28:15 +02:00
2c7dc70878 Reset close status for next frame #1339 2020-08-06 11:47:46 +02:00
Ray
b5eb104b08 Consider empty title for window #1323 2020-07-24 18:20:37 +02:00
feedf332a8 Issue with render size assignment on RPI/Android #1314 2020-07-17 18:39:31 +02:00
7760575d3f fix emcc warning (-Wparentheses-equality) (#1310) 2020-07-14 21:25:21 +02:00
a9d676a5fd scale perspective top calc for near culing plane (#1309) 2020-07-14 10:36:22 +02:00
7199dd570f REVIEW: Pointer lock emscripten API does not work #1241
It seems some internals change recently due to web security reasons and some emscripten HTML5 funtionalities like pointerLock or fullscreen modes behave very weird or just don't work as expected
2020-07-10 18:23:17 +02:00
Ray
5986eee6ab Expose additional configuration options
Some internal defines have been exposed in config.h
2020-06-30 11:05:09 +02:00
Ray
eae6e6a828 Minor format tweak 2020-06-27 14:11:21 +02:00
25fb24ba7d [add] GetMonitorRefreshRate(int monitor); (#1289) 2020-06-24 18:28:57 +02:00
Ray
38530ebf12 REVIEWED: ToggleFullscreen(), issue #1287 2020-06-23 00:39:06 +02:00
ad954dc7ab WARNING: BIG CHANGE: Move Color functions to texture module
WARNING: Some functions ADDED and some RENAMED:
- RENAMED: Fade() -> ColorAlpha() [Added #define for compatibility]
- ADDED: ColorAlphaBlend()
- ADDED: GetPixelColor()
- ADDED: SetPixelColor()
2020-06-15 12:02:50 +02:00
6264c4901b Fix wrong height used when using scissor mode with render texture of different height from window (#1272) 2020-06-08 10:32:23 +02:00
5d0b2c796e Remove warning from GetDirectoryPath() 2020-06-07 11:50:03 +02:00
a4333035c7 Use TRACELOG() macro instead of TraceLog() function 2020-06-02 23:07:42 +02:00
aff47d1564 Added bool IsCursorOnScreen(void). (#1262)
- The Mouse struct already stores cursorOnScreen. This function simply exposes it to the usage code.
2020-05-26 11:59:25 +02:00
94789dd24a Review usage of sizeof(), unify conventions
All functions requiring sizeof() now follow the same convention:

NUM_ELEMENTS*NUM_SUBELEMENTS*sizeof()
2020-05-23 19:23:40 +02:00
7b001164ef Review formatting GetPRevDirectoryPath() 2020-05-14 17:37:54 +02:00
64d44d131d Emscripten fullscreen -WIP- 2020-05-14 17:35:26 +02:00
ivn
730375faf7 fix bug in GetPrevDirectoryPath on Unix-like systems (#1246) 2020-05-14 17:30:32 +02:00
913ef1d56f Misc code reviews 2020-05-09 13:05:54 +02:00
0bd64b7975 Gamepad axis bug fixes and improvement (#1228)
* 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-09 12:39:41 +02:00
fdad1f023b Avoid all MSVC compile warnings
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-06 19:12:09 +02:00
526c85773f Replace deprectared usleep() calls 2020-05-06 11:33:08 +02:00
51c3bef497 Review exposed #defines and allow user re-defining
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-05-01 17:31:44 +02:00
1c15dc7292 Reviewed UWP update
Mostly code formatting tweaks
2020-04-30 21:00:09 +02:00
0981dde9d4 Remove strcmp() requirement 2020-04-30 20:17:16 +02:00
4b03860810 UWP rework (#1231)
* 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-30 19:48:39 +02:00
ac8f436c3b Init CORE.Window.focused 2020-04-29 20:55:17 +02:00