0
0
mirror of https://github.com/termux/termux-packages.git synced 2025-09-19 07:09:35 +00:00
Files
termux-packages/packages/pacman4console/0001-pacman.c.patch
Robert Kirkman f55224a8e6 fix(main/pacman4console): do not touch $TERMUX_PREFIX/share/pacman
- Forces the entire software to use the folder `$TERMUX_PREFIX/share/pacman4console`, for the game "`pacman4console`", instead of the folder `$TERMUX_PREFIX/share/pacman`, which should be reserved exclusively for asset files related to the package manager "`pacman`"

- Fixes https://github.com/termux/termux-packages/issues/26369
2025-09-16 12:48:10 -05:00

31 lines
1018 B
Diff

--- ../pacman.c.orig 2019-08-11 11:04:35.143786214 +0200
+++ ./pacman.c 2019-08-11 11:10:17.706727190 +0200
@@ -17,7 +17,7 @@
#include <stdlib.h>
#include <time.h>
#include <unistd.h>
-#include <sys/timeb.h>
+#include <sys/time.h>
#include "pacman.h"
#define EXIT_MSG "Good bye!"
@@ -231,14 +231,14 @@
void Delay() {
//Needed to get time
- struct timeb t_start, t_current;
- ftime(&t_start);
+ struct timeval t_start, t_current;
+ gettimeofday(&t_start, NULL);
//Slow down the game a little bit
do {
GetInput(); //Still get the input from keyboard
- ftime(&t_current); //Update time and check if enough time has overlapped
- } while (abs(t_start.millitm - t_current.millitm) < SpeedOfGame);
+ gettimeofday(&t_current, NULL); //Update time and check if enough time has overlapped
+ } while (labs(t_start.tv_usec - t_current.tv_usec)/1000 < SpeedOfGame);
}
/****************************************************************