# \[PATCH\] Little bug correction

**URL:** <https://discourse.libsdl.org/t/patch-little-bug-correction/6039>\
**Category:** SDL Development\
**Created:** [February 20, 2002, 2:31pm UTC](https://discourse.libsdl.org/t/patch-little-bug-correction/6039 "2002-02-20T14:31:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Patrice\_Mandin](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/47e85d/32.png) [@Patrice\_Mandin](https://discourse.libsdl.org/u/Patrice_Mandin)\
**Post date:** [February 20, 2002, 2:31pm UTC](https://discourse.libsdl.org/t/patch-little-bug-correction/6039/1 "2002-02-20T14:31:05Z")

</div>

For Sam:  
Could you apply this little patch, it corrects a bug where some keys are  
blocked in pressed state, and can not be used anymore.

–8\<–8\<–8\<–8\<–8\<–8\<–8\<–8\<–

— SDL-1.2.4-cvs/src/video/gem/SDL\_gemevents.c Sun Feb 17 20:54:28 2002  
+++ SDL-1.2.4-mint/src/video/gem/SDL\_gemevents.c Wed Feb 20 23:17:45 2002  
@@ -180,7 +180,7 @@

```
	/* Key unpressed ? */
	if (gem_previouskeyboard[i] && !gem_currentkeyboard[i])

```

- 

```
  	SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, 0, &keysym));

```

- 

```
  	SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, gem_currentascii[i], &keysym));

```

}

memcpy(gem\_previouskeyboard,gem\_currentkeyboard,sizeof(gem\_previouskeyboard));

–8\<–8\<–8\<–8\<–8\<–8\<–8\<–8\<----  
Patrice Mandin  
WWW: [http://www.multimania.com/pmandin](http://www.multimania.com/pmandin)  
Programmeur Linux, Atari  
Sp?cialit?: D?veloppement, jeux

---

<div class="post-metadata">

**Author:** ![Patrice\_Mandin](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/47e85d/32.png) [@Patrice\_Mandin](https://discourse.libsdl.org/u/Patrice_Mandin)\
**Post date:** [February 21, 2002, 2:56am UTC](https://discourse.libsdl.org/t/patch-little-bug-correction/6039/2 "2002-02-21T02:56:00Z")

</div>

Dans l’article \<3k715a.h8a.ln at 127.0.0.1\>, “Patrice Mandin”  
 a tapot? avec ses petits doigts:

Well, I also checked other keyboard input drivers, and the bug is also  
there, so add these patches please:

–8\<–8\<–8\<–8\<–8\<–8\<–8\<–8\<–

— SDL-1.2.4-cvs/src/video/ataricommon/SDL\_biosevents.c Sun Feb 17 20:54:28 2002  
+++ SDL-1.2.4-mint/src/video/ataricommon/SDL\_biosevents.c Thu Feb 21 11:43:42 2002  
@@ -139,7 +139,7 @@

```
	/* Key unpressed ? */
	if (bios_previouskeyboard[i] && !bios_currentkeyboard[i])

```

- 

```
  	SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, 0, &keysym));

```

- 

```
  	SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, bios_currentascii[i], &keysym));

```

}

AtariXbios\_PostMouseEvents(this);  
— SDL-1.2.4-cvs/src/video/ataricommon/SDL\_gemdosevents.c Sun Feb 17 20:54:28 2002  
+++ SDL-1.2.4-mint/src/video/ataricommon/SDL\_gemdosevents.c Thu Feb 21 11:44:01 2002  
@@ -144,7 +144,7 @@

```
  /* Key unpressed ? */
  if (gemdos_previouskeyboard[i] && !gemdos_currentkeyboard[i])

```

- 

```
  	SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, 0, &keysym));

```

- 

```
  	SDL_PrivateKeyboard(SDL_RELEASED, TranslateKey(i, gemdos_currentascii[i], &keysym));

```

}

AtariXbios\_PostMouseEvents(this);

–8\<–8\<–8\<–8\<–8\<–8\<–8\<–8\<----  
Patrice Mandin  
WWW: [http://www.multimania.com/pmandin](http://www.multimania.com/pmandin)  
Programmeur Linux, Atari  
Sp?cialit?: D?veloppement, jeux

---

<div class="post-metadata">

**Author:** ![slouken](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/s/ec9cab/32.png) [@slouken](https://discourse.libsdl.org/u/slouken)\
**Post date:** [February 21, 2002, 1:53pm UTC](https://discourse.libsdl.org/t/patch-little-bug-correction/6039/3 "2002-02-21T13:53:01Z")

</div>

> Dans l’article \<3k715a.h8a.ln at 127.0.0.1\>, “Patrice Mandin”  
> a tapot? avec ses petits doigts:

> Well, I also checked other keyboard input drivers, and the bug is also  
> there, so add these patches please:

You got it, thanks!

```
-Sam Lantinga, Software Engineer, Blizzard Entertainment

```

---

<div class="post-metadata">

**Author:** ![Patrice\_Mandin](https://discourse.libsdl.org/letter_avatar_proxy/v4/letter/p/47e85d/32.png) [@Patrice\_Mandin](https://discourse.libsdl.org/u/Patrice_Mandin)\
**Post date:** [February 22, 2002, 3:31am UTC](https://discourse.libsdl.org/t/patch-little-bug-correction/6039/4 "2002-02-22T03:31:00Z")

</div>

“Sam Lantinga” wrote:

> You got it, thanks!
> 
> -Sam Lantinga, Software Engineer, Blizzard Entertainment

Seems you forgot to apply the patch from my first post (in  
SDL\_gemevents.c). There are three patches to do.–  
Patrice Mandin  
WWW: [http://www.multimania.com/pmandin](http://www.multimania.com/pmandin)  
Programmeur Linux, Atari  
Sp?cialit?: D?veloppement, jeux
