擅长:python、mysql、java
<p>我对pygame了解不多,但这里有一种使用模块<code>win32api</code>的方法:</p>
<pre><code>from win32api import GetSystemMetrics
width = GetSystemMetrics(0)
height = GetSystemMetrics(1)
</code></pre>
<p><strong>更新</strong>:在浏览了<a href="http://www.pygame.org/docs/ref/display.html#pygame.display.Info" rel="nofollow">docs</a>之后,您似乎可以从<code>pygame.display.Info</code>获得它,如下所示:</p>
<pre><code>width, height = pygame.display.Info().current_w, pygame.display.Info().current_h
</code></pre>
<p>希望这有帮助!</p>