...and then we can use a "record" class here.

This commit is contained in:
Ray J. Greenwell
2026-05-12 15:30:49 -07:00
parent 8799897394
commit f1cb1d7ee5
@@ -68,25 +68,7 @@ public class SoundManager
* @param refresh TODO * @param refresh TODO
* @param sync TODO * @param sync TODO
*/ */
public static class InitArgs public static record InitArgs (int frequency, int refresh, boolean sync) {}
{
public InitArgs (int frequency, int refresh, boolean sync)
{
_frequency = frequency;
_refresh = refresh;
_sync = sync;
}
public int frequency () { return _frequency; }
public int refresh () { return _refresh; }
public boolean sync () { return _sync; }
private final int _frequency, _refresh;
private final boolean _sync;
}
// TODO: Should be this:::: ARGH!
//public static record InitArgs (int frequency, int refresh, boolean sync) {}
// Match the pre-LWJGL3 AL.create("", 44100, 15, false). // Match the pre-LWJGL3 AL.create("", 44100, 15, false).
public static InitArgs getDefaultInitArgs () public static InitArgs getDefaultInitArgs ()