Inputs in SDL (on key pressed)

I would like to know how can I detect the press of a key or release of a key in a while loop in SDL. Now, I know you can get the events with SDL like OnKeyPressed, OnKeyReleased, OnKeyHit, etc,...

SDL init failure, reason is: No available video device

I tried to start my avd on Ubuntu 64bit 10.10, but it failed and shows the following in the log: SDL init failure, reason is: No available video device What can I do with that? I tried to search...

Android crash when app is closed and reopened

I have a really simple android app that just displays a blank white screen. When I close the app by pressing the HOME button, then try to open the app again, it crashes and I get the "Force Close"...

How to set multiple alarms using alarm manager in android

I'm building an alarm application. I have successfully implemented basic alarm functions. Calendar calendar = Calendar.getInstance(); calendar.set(calendar.HOUR_OF_DAY,...

defining sdl_rect and sdl_mousebuttondown

I need to define rectangular areas on the sdl window so that when the mouse button is clicked on a particular area some action has to be performed. I used GetMouseState(x,y) to get the mouse click...

SDL missing x86_64 architecture

I'm trying to get the SDL example code for XCode working on my Snow Leopard machine, however every time I attempt to build I receive this error: "ld: warning: in /Users/me/Dropbox/Programming/Obj...

Uncaught SoapFault exception: [HTTP] Not Found

Here is my code $client = new SOAPClient ( 'http://torcache.net/torcache.wsdl'); var_dump($client->cacheTorrent()); i got this after var_dump of $client object(SoapClient)#1 (2) {...

jqGrid. Get rows from subgrid

I have jqGrid with subgrids. How to get rows from subGrid? What I'm doing wrong? Below function, where i'm trying get rows, but always have errors. loadComplete: function() { var rowIds =...

Emscripten - C++ with pure html5 canvas support (not WebGL)

Is there any way of accessing canvas 2D context under C++ when using emscripten? I'd like to be able to draw simple shapes/paths using canvas' api functions like lineTo, fillRect1d done, etc. (so...

How to include SDL in your program (Linux). undefined reference to SDL_Init()

Im trying everything to run this test Program and keep getting this error messages: g++ objects/src_files/display.o objects/src_files/main.o -o program -L/usr/local/lib objects/src_files/main.o:...

Problems on editing json file (Error: Parse error on line 1:...Expecting 'STRING', 'NUMBER', 'NULL'

I am not a programmer, but a software translator. and I received a job with some json files, and I have to edit them. Unfortunately, when I use Passollo from SDL Trados, and any other json editing...

Interrupting open() with SIGALRM

We have a legacy embedded system which uses SDL to read images and fonts from an NFS share. If there's a network problem, TTF_OpenFont() and IMG_Load() hang essentially forever. A test application...

Linking SDL with FreePascal (using Lazarus) on Windows OS

Ok, so for a game I'm working on, my programmer has decided to use FreePascal with SDL, and has shown me that it works (though he is using a Linux OS and I'm not). I have tried multiple methods of...

How to draw raw pixels in c++ for windows and linux easily like in the processing language?

I am trying to find what the simplest solution is for drawing raw pixels to the screen using c++. Processing has an extremely dead simple way to do this: color pink = color(255, 102,...

enum class as array index

I made an enum as: enum class KeyPressSurfaces { KEY_PRESS_SURFACE_DEFAULT, KEY_PRESS_SURFACE_UP, KEY_PRESS_SURFACE_DOWN, KEY_PRESS_SURFACE_LEFT, KEY_PRESS_SURFACE_RIGHT, ...

C++ Game Programming. Error: expected ')' before ':' token

I'm going through the tutorial on Lazyfoo: 'Beginning Game Programming'. I've just completed tutorial number 4. My problem is as follows: The code works fine apart from the line: SDL_Surface*...

Combining SDL windows and GTK+ windows in the same program

I'm creating and SDL program in which some functions open GTK+ windows. The main window is an SDL window and the GTK+ windows are mostly dialog boxes. The main() function opens the SDL window...

Python error when installing pygame using Windows

I am new to this Forum and I wanted to ask you: I am trying to install pygame and other modules for python, some work, but some don't! For example we'll take pygame: my setuptools are fully...

Can you search or filter Vim completions?

I am using Vim 8.0 with Python3 and myint/ClangComplete for C/C++ completions. SDL_<tab> suggests every function and type from SDL. Is there any way to limit suggestions to SDL_EventType types,...

can't include Python.h in visual studio

(I do find a lot of similar questions, but so far non of these fits me...) ===========Updated error message, images, Command Line=========== I am trying to #include <Python.h>(that's nearly all...

How to extend an existing type using graphql-js classes (no SDL)?

Using SDL, I can do this: extend type Query { something: String! } How can I do that when building a type via the built-in GraphQLObjectType class? It doesn't seem to be documented anywhere.

Playing sound from a video using FFmpeg and SDL_QueueAudio results in high pitched audio

I'm trying to play audio from an mp4 file using SDL2 and FFmpeg, and using SDL_QueueAudio seems much easier than setting up a callback. All solutions I've found, whether here or in the dranger...

AddInstanceForFactory & HALC_ShellDriverPlugIn errors when using SDL2 with Xcode?

I am trying to make a simple game using SDL2 and C++ on Xcode 11.2.1; however, my progress has been stopped by an error. All it takes to encounter these errors is simply initializing SDL. Just...

Prisma 2 query to return records only that are associated with ALL of the provided tag IDs

I have tables Principles and Tags. And there is a many-to-many relation between them (joined implicitly). Without using prisma.raw, how can I run the following query? SELECT p.id, p.title,...

How to use emscripten ports (SDL2 and Freetype) with cmake

I'm trying to compile a C++ project using CMake to webassembly. I'm using emscripten and I want to use the emscripten ports for SDL2 and Freetype. Normally, when compiling with emcc, you would use...

How do I use SDL2 in my programs correctly?

I want to make a game using SDL2, but I'm unable to compile and/or run my code, please help! SDL2 is notoriously hard to set up, and it's often the first library aspiring game developers try to...

Python - called Tcl_FindHashEntry on deleted table when Pygame window is focused after using Tkinter

So I was working on a larger project and testing on a Mac when I noticed some weird behavior. I'm using Python 3.9.1 and macOS 11.0.1 – the bug doesn't occur on Windows 7, and I haven't tested...

How can I print the schema in HotChocolate as GraphQL SDL

It would be great for development with Relay to print the GraphQL SDL directly with the Hot Chocolate GraphQL server. Is there a way to do this? schema { query: Query } type Query { sayHello:...

Fastest way to draw filled quad/triangle with the SDL2 renderer?

I have a game written using SDL2, and the SDL2 renderer (hardware accelerated) for drawing. Is there a trick to draw filled quads or triangles? At the moment I'm filling them by just drawing lots...

Unable to Launch Game on Arch Linux Via Steam

I am trying to start Civilization 5 on a Arch Linux System using Steam/Lutris. The game launches fine until the map is ready to be displayed. Once the map is ready to be displayed and the game has...