Comments (4)
The solution would be for you to declare a const UInt8 *
global variable instead, which can still be reassigned later whenever you call SDL_GetKeyboardState.
from sdl.
but reassign any const var will cause compile-time error. I'm using c99 and gcc 11.4.0-1ubuntu1~22.04
from sdl.
const UInt8 *
disallows modification of the memory (the array), but allows reassigning the variable to a different pointer, so there'll be no compile time error unless you're trying to modify the array.
from sdl.
It works :)
thanks very much
from sdl.
Related Issues (20)
- Problem emulator Atari ST HOT 2
- Change SDL_VIDEO_GL_DRIVER and SDL_VIDEO_EGL_DRIVER environment variables to hints?
- Why SDL_RenderReadPixels get no data when in main thread? HOT 2
- rwops don't have the details on the opening error available for stdio mode. HOT 1
- SDL stops sending key events if key compositions/ime ui related actions are being processed
- SDL3 Feature Request: SDL_GetAudioFormatName HOT 2
- testpopup segfaults with direct3d11 renderer HOT 2
- [SDL2] Changing refresh_rate to float instead of int. HOT 6
- SDL_SetWindowsMessageHook() issues HOT 2
- Memory leak in get_driindex() of SDL_kmsdrmvideo.c when DRM Master can't be obtained HOT 4
- SDL_CreateDirectories / SDL_CreatePath HOT 1
- SDL3: Mouse cursor gets locked when calling SDL_HideCursor() HOT 3
- WASAPI can't find requested audio endpoint: Element not found.
- SDL_CopyDirectory, SDL_RenameDirectory HOT 3
- SDL_SetSurfaceColorKey() sets wrong color HOT 4
- SDL_Init(SDL_INIT_AUDIO) randomly segfaults on init HOT 19
- NetBSD CI is down HOT 1
- SDL_GetHint does not work when not calling SDL_Init HOT 1
- main callbacks return enum values? HOT 1
- Missing Pen backends HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sdl.