Remove undo.patch again. Currently it doesn't work as expected.
Markus Koschany
5 years ago
8 | 8 |
* Move the package to salsa.debian.org.
|
9 | 9 |
* Use pkg-config instead of freetype-config.
|
10 | 10 |
Thanks to Reiner Herrmann for the patch. (Closes: #892337)
|
11 | |
* Bill Allombert: Implement an undo feature to undo the last move.
|
12 | |
Thanks to Bill Allombert for the report and patch. (Closes: #845269)
|
13 | 11 |
|
14 | 12 |
-- Markus Koschany <apo@debian.org> Sat, 20 Oct 2018 18:57:34 +0200
|
15 | 13 |
|
5 | 5 |
06_gcc-4.7.patch
|
6 | 6 |
disable-quake-pieces.patch
|
7 | 7 |
use-pkg-config.patch
|
8 | |
undo.patch
|
0 | |
Index: brutalchess-0.5.2+dfsg/src/gamecore.cpp
|
1 | |
===================================================================
|
2 | |
--- brutalchess-0.5.2+dfsg.orig/src/gamecore.cpp
|
3 | |
+++ brutalchess-0.5.2+dfsg/src/gamecore.cpp
|
4 | |
@@ -349,6 +349,14 @@ bool GameCore::handleEvent(SDL_Event& e)
|
5 | |
m_menu.activate();
|
6 | |
}
|
7 | |
}
|
8 | |
+ if (e.key.keysym.sym == SDLK_BACKSPACE) {
|
9 | |
+ if(m_firstclick.isValid()) {
|
10 | |
+ SDL_SetCursor(m_defaultcur);
|
11 | |
+ m_set->deselectPosition();
|
12 | |
+ m_firstclick.invalidate();
|
13 | |
+ }
|
14 | |
+ m_game.undoMove();
|
15 | |
+ }
|
16 | |
}
|
17 | |
else if (e.type == SDL_USEREVENT) {
|
18 | |
if(e.user.code == 0) {
|
19 | |
Index: brutalchess-0.5.2+dfsg/src/chessgame.cpp
|
20 | |
===================================================================
|
21 | |
--- brutalchess-0.5.2+dfsg.orig/src/chessgame.cpp
|
22 | |
+++ brutalchess-0.5.2+dfsg/src/chessgame.cpp
|
23 | |
@@ -80,9 +80,9 @@ void ChessGame::undoMove()
|
24 | |
m_state = m_history_stack.top();
|
25 | |
m_redo_stack.push(m_history_stack.top());
|
26 | |
m_history_stack.pop();
|
27 | |
+ m_player1->undoMove();
|
28 | |
+ m_player2->undoMove();
|
29 | |
}
|
30 | |
- m_player1->undoMove();
|
31 | |
- m_player2->undoMove();
|
32 | |
}
|
33 | |
|
34 | |
// End of file chessgame.cpp
|