mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-18 11:48:02 +00:00
InputProxy.java no longer synchronized
This commit is contained in:
@@ -62,7 +62,7 @@ public class InputQueue extends MyObservable implements java.io.Serializable {
|
|||||||
* @param in
|
* @param in
|
||||||
* a {@link forge.control.input.InputBase} object.
|
* a {@link forge.control.input.InputBase} object.
|
||||||
*/
|
*/
|
||||||
public final void setInput(final Input in) {
|
private final void setInput(final Input in) {
|
||||||
//System.out.println(in.getClass().getName());
|
//System.out.println(in.getClass().getName());
|
||||||
this.inputStack.push(in);
|
this.inputStack.push(in);
|
||||||
// System.out.print("Current: " + input + "; Stack = " + inputStack);
|
// System.out.print("Current: " + input + "; Stack = " + inputStack);
|
||||||
@@ -99,7 +99,7 @@ public class InputQueue extends MyObservable implements java.io.Serializable {
|
|||||||
* @param update
|
* @param update
|
||||||
* a boolean.
|
* a boolean.
|
||||||
*/
|
*/
|
||||||
public final void removeInput(Input inp) {
|
final void removeInput(Input inp) {
|
||||||
FThreads.assertExecutedByEdt(false);
|
FThreads.assertExecutedByEdt(false);
|
||||||
|
|
||||||
Input topMostInput = inputStack.isEmpty() ? null : inputStack.pop();
|
Input topMostInput = inputStack.isEmpty() ? null : inputStack.pop();
|
||||||
|
|||||||
@@ -53,8 +53,8 @@ public class InputProxy implements Observer {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public final synchronized void update(final Observable observable, final Object obj) {
|
public final void update(final Observable observable, final Object obj) {
|
||||||
//synchronized(this) {} // want to update all changes to memory
|
synchronized(this) {} // want to update all changes to memory
|
||||||
FThreads.assertExecutedByEdt(false);
|
FThreads.assertExecutedByEdt(false);
|
||||||
|
|
||||||
final PhaseHandler ph = game.getPhaseHandler();
|
final PhaseHandler ph = game.getPhaseHandler();
|
||||||
@@ -76,7 +76,7 @@ public class InputProxy implements Observer {
|
|||||||
};
|
};
|
||||||
|
|
||||||
if( nextInput instanceof InputAutoPassPriority )
|
if( nextInput instanceof InputAutoPassPriority )
|
||||||
nextInput.showMessage(game.getInputQueue());
|
ph.getPriorityPlayer().getController().passPriority();
|
||||||
else
|
else
|
||||||
FThreads.invokeInEdtLater(showMessage);
|
FThreads.invokeInEdtLater(showMessage);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user