Open sirlee opened 4 years ago
Update:
small change that will only trigger the aspect patch when the height change is triggered:
if ( ( !pinhack.specifichack.pinballdreams.enabled || pinhack.specifichack.pinballdreams.trigger ) &&
( height>=pinhack.triggerheight.min && height<=pinhack.triggerheight.max ) &&
( pinhack.triggerwidth.min<=width && width<=pinhack.triggerwidth.max ) ) {
printf("triggered -> ");
pinhack.trigger = true;
printf("original geometry: %dx%d. expanding to geometry: %dx%d.\n",width,height,
pinhack.expand.width ? pinhack.expand.width : width,
pinhack.expand.height ? pinhack.expand.height : height);
// If width or height not set, do not expand!
if ( pinhack.expand.height ) height = pinhack.expand.height;
if ( pinhack.expand.width ) width = pinhack.expand.width;
if ( pinhack.specifichack.pinballdreams.trigger ) pinhack.specifichack.pinballdreams.trigger=false; // On next resolution change, return to normal
aspect_ratio = pinhack.aspectratio;
} else {
pinhack.trigger = false;
printf("trigger values evalueted but not triggered! Current resolution: %dx%d\n",width,height);
};
//aspect_ratio = ((float)width / (float)height) * ( 25.0 / 7);
//aspect_ratio = pinhack.aspectratio;
Thanks sirlee!! :D We can try adding those changes in the repository. If you have any repo modifications, please feel free to create a PR or I'll try to create the changes and add them to master branch.
Thanks again 👏
I have to say I am no full-blown programmer. I know some C++ from Arduino and have some experience with Visual Studio, but I am a bit lost when it comes to GITHub and its terminology. I do not even know what you mean with PR.
Therefore, may I ask you to try to put it into the master branch?
Thanks you very much for putting time/effort into this solution!
@Kappa971, you may be interested in this?
@Kappa971, you may be interested in this?
I'm interested in anything that might make those games display properly, but I'm not a developer. You need to ask the DOSBox Staging developers if they are interested in this patch.
The patch is great, however whatever I did I could not find a way to get rid of the black borders with this patch.
For this reason I have introduced a new configurable parameter under the pinhack section that allows you to set a custom aspect ratio. With this you will get a perfectly scaled output.
It uses tha aspect_ratio so "aspect=true" in the .conf file needds to be set
.conf file settings:
I modified the following source code files after applying your patch:
vga_draw.cpp:
pinhacks.h
dosbox.cpp
I hope you like these modifications and put them into your "official" patch :) I have added a compiled windows 10 .exe if you want to do a quick test. (I will also put the precompiled exe into the topic at the vogons forum.)
dosboxAllPinballscd.zip dosbox_sourcecode_and_conf.zip