Fixed menu position on resize
[supertux.git] / src / game_session.cpp
index a0e48c3..26f65f1 100644 (file)
@@ -444,7 +444,7 @@ GameSession::draw_pause(DrawingContext& context)
 {
   context.draw_filled_rect(
       Vector(0,0), Vector(SCREEN_WIDTH, SCREEN_HEIGHT),
-      Color(.2f, .2f, .2f, .5f), LAYER_FOREGROUND1);
+      Color(0.0f, 0.0f, 0.0f, .25f), LAYER_FOREGROUND1);
 }
 
 void
@@ -528,7 +528,7 @@ GameSession::update(float elapsed_time)
   }
 
   // update sounds
-  sound_manager->set_listener_position(currentsector->player->get_pos());
+  if (currentsector && currentsector->camera) sound_manager->set_listener_position(currentsector->camera->get_center());
 
   /* Handle music: */
   if (end_sequence)