Let CMsgHandler::serverInit() handle initial set up
Avoid using the callbacks used for runtime changes for the initial
setup. They weren't really useful anyway as you could not allocate
a framebuffer without also knowing the pixel format. So make things
more clear by letting serverInit() get the initial settings.
diff --git a/tests/encperf.cxx b/tests/encperf.cxx
index f8b2555..6f9283b 100644
--- a/tests/encperf.cxx
+++ b/tests/encperf.cxx
@@ -89,7 +89,7 @@
void getStats(double& ratio, unsigned long long& bytes,
unsigned long long& rawEquivalent);
- virtual void setDesktopSize(int w, int h);
+ virtual void initDone();
virtual void setCursor(int, int, const rfb::Point&, const rdr::U8*);
virtual void framebufferUpdateStart();
virtual void framebufferUpdateEnd();
@@ -196,12 +196,10 @@
sc->getStats(ratio, bytes, rawEquivalent);
}
-void CConn::setDesktopSize(int w, int h)
+void CConn::initDone()
{
rfb::ModifiablePixelBuffer *pb;
- CConnection::setDesktopSize(w, h);
-
pb = new rfb::ManagedPixelBuffer((bool)translate ? fbPF : server.pf(),
server.width(), server.height());
setFramebuffer(pb);