Commit graph

620 commits

Author SHA1 Message Date
Jeffery Myers
df249f5513
Fix typecast warnings in raylib code as reported by visual studio 2019 (#1443) 2020-11-30 08:14:11 +01:00
Ray
3d1ae3500c REVIEWED: Window state flags -WIP-
WARNING: Several functions removed, replaced by SetWindowState() / ClearWindowState() equivalents, only for advance users.
ADDED: ClearWindowState() to reset window state
REMOVED: HideWindow() / UnhideWindow()
REMOVED: DecorateWindow() / UndecorateWindow()
2020-11-23 23:46:05 +01:00
Ray
468a0bedd8 REDESIGNED: Window state config #1367 -WIP-
Some flags not working properly yet...
2020-11-23 00:49:27 +01:00
Ray
bb9d734f69 Exposing some file access results to user layer #1420 2020-11-22 00:10:16 +01:00
Ray
4eae76302f REPLACED: rgif.h by msf_gif.h
The improvement in performance is considerable!
2020-11-20 00:34:18 +01:00
raysan5
8ff2b387f9 Review code formating 2020-11-15 13:17:11 +01:00
Ilya3point999K
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
kernelkinetic
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
raysan5
482b8a5e7e Some tweaks 2020-10-24 10:37:15 +02:00
Ray
f12db180cd Reviewed PR #1407 2020-10-21 11:08:37 +02:00
Chance Snow
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
kernelkinetic
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
Doyle
b29311c7ca
mouse: Return float movement for precise scrolling where possible (#1397) 2020-10-05 20:16:23 +02:00
kernelkinetic
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
kernelkinetic
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
raysan5
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
raysan5
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
raysan5
85d5744679 REVIEW: glfwSetWindowMaximizeCallback() not available on web 2020-09-07 15:34:21 +02:00
raysan5
05cdaf7d01 MOVED: rlUnproject() [rlgl] -> Vector3Unproject() [raymath] 2020-09-01 21:08:45 +02:00
Juan Medina
dcbe481a28
adding new windows functions (#1357) 2020-09-01 20:29:13 +02:00
raysan5
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
raysan5
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
raysan5
feedf332a8 Issue with render size assignment on RPI/Android #1314 2020-07-17 18:39:31 +02:00
Random
7760575d3f
fix emcc warning (-Wparentheses-equality) (#1310) 2020-07-14 21:25:21 +02:00
seanpringle
a9d676a5fd
scale perspective top calc for near culing plane (#1309) 2020-07-14 10:36:22 +02:00
raysan5
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
Shylie
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
raysan5
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
Chang Si Yuan
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
raysan5
5d0b2c796e Remove warning from GetDirectoryPath() 2020-06-07 11:50:03 +02:00
raysan5
a4333035c7 Use TRACELOG() macro instead of TraceLog() function 2020-06-02 23:07:42 +02:00
ChrisDill
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
raysan5
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
raysan5
7b001164ef Review formatting GetPRevDirectoryPath() 2020-05-14 17:37:54 +02:00
raysan5
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
raysan5
913ef1d56f Misc code reviews 2020-05-09 13:05:54 +02:00
Mickaël Malécot
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
raysan5
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
raysan5
526c85773f Replace deprectared usleep() calls 2020-05-06 11:33:08 +02:00